Method and apparatus for quickly evaluating safety and stability of power system, and terminal
By pixelating the steady-state characteristic variables of the power system into a three-channel image and using a fusion model of deep residual network and Transformer, the timeliness and accuracy of power system transient stability assessment are solved, realizing fast and accurate power system transient stability assessment and improving the intelligence level of power grid situation awareness.
Patent Information
- Application Number
- PCT/CN2024/129722
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-02
- Filing Date
- 2024-11-04
- Publication Date
- 2026-01-08
AI Technical Summary
Existing methods for assessing transient stability in power systems suffer from insufficient timeliness and accuracy. Time-domain simulation methods are highly adaptable but have low timeliness, while direct methods tend to yield conservative results due to the simplification of physical models.
A fusion model based on deep residual networks and Transformers is adopted. By pixelating the steady-state characteristic variables of the power system into three-channel pixelated images, a sample set is constructed and the model is trained to achieve rapid assessment of the safety and stability of the power system.
It enables rapid and accurate assessment of the transient stability of the power system within milliseconds, improving the intelligence level of power grid situational awareness and reducing the workload of dispatching personnel.
Smart Images

Figure CN2024129722_08012026_PF_FP_ABST
Abstract
Description
Power system safety and stability rapid evaluation method, device and terminal
[0001] Cross-reference to Related Applications
[0002] The present application claims priority to the Chinese patent application No. 202410873998X, filed on July 2, 2024, and entitled "Power system safety and stability rapid evaluation method, device and terminal", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0003] The present application relates to the field of power grid operation and control, in particular to a power system safety and stability rapid evaluation method, device and terminal. BACKGROUND
[0004] The power system is one of the most important, largest and most complex man-made systems in modern society. With the further strengthening of source and load uncertainty, grid vulnerability and openness, the scale of the power grid is continuously expanding, the operation mode of the power grid is becoming more complex and variable, the transient stability boundary of the power system is constantly changing, the transient stability mechanism of the power system is increasingly complex, and the risk of mismatch between power grid safety and stability is continuously increasing.
[0005] The transient stability problem of the power system is a key factor threatening the safe operation of the large-scale power grid, and may cause the collapse of the power system in severe cases. At present, among the methods for transient stability evaluation, the time domain simulation method has strong adaptability but low timeliness, and the direct method is conservative due to the simplification of the physical model.
[0006] Therefore, it is urgent to research a technical solution capable of rapidly evaluating the transient stability of the power system.
[0007] SUMMARY
[0008] In view of this, the present application provides a power system safety and stability rapid evaluation method, device and terminal, aiming to solve the problems of insufficient timeliness and accuracy of the existing power system transient stability evaluation method.
[0009] In a first aspect, the present application provides a power system safety and stability rapid evaluation method, comprising:
[0010] pixelating the measured or simulated power steady-state characteristic variable to generate an offline three-channel pixelized image, and constructing a sample set; the electrical quantity type of the power steady-state characteristic variable includes voltage, active power and reactive power;
[0011] training a fusion model based on deep residual network and Transformer using the constructed sample set, and the trained fusion model is used for power system safety and stability rapid evaluation;
[0012] The real-time measured power steady-state characteristic variables are pixelated to generate an online three-channel pixelized image; the generated online three-channel pixelized image is processed by using the trained fusion model to generate a power system transient stability state evaluation conclusion.
[0013] Further, the pixelating of the measured or simulation-generated power steady-state characteristic variables includes:
[0014] According to the power grid topology, the power grid is pixelated by using an escape mechanism to map each element of the power grid to each planar graph in a basic image; the basic image includes a non-bus basic image and a bus basic image.
[0015] Further, the pixelating of the measured or simulation-generated power steady-state characteristic variables to generate an offline three-channel pixelized image includes:
[0016] The power steady-state characteristic variables are mapped to the non-bus basic image to generate an active power pixelized image and a reactive power pixelized image, and the power steady-state characteristic variables are mapped to the bus basic image to generate a voltage pixelized image;
[0017] The active power pixelized image, the reactive power pixelized image, and the voltage pixelized image are structured into the offline three-channel pixelized image.
[0018] Further, the construction of the sample set includes:
[0019] A power grid time-domain simulation model is used to set faults that may cause system instability for multiple typical power grid operating modes, to perform offline simulation on the power grid, and to obtain state quantities when the power grid is stably operated before the faults are injected;
[0020] From the state quantities of the power grid stably operated before the faults are injected obtained from multiple typical power grid operating modes, multiple electrical quantities used to represent system transient stability are selected as power steady-state characteristic variables;
[0021] The selected power steady-state characteristic variables are pixelated to generate multiple groups of offline three-channel pixelized images.
[0022] Each group of three-channel pixelized images and its corresponding transient stability label are combined into each sample to form a sample set.
[0023] Further, the training of the fusion model based on the depth residual network and the Transformer by using the constructed sample set includes:
[0024] The three-channel pixelized image corresponding to each sample in the sample set is taken as the input of the deep residual network, the matrix feature map generated by the deep residual network is taken as the input of the Transformer based on the multi-head attention mechanism, and the transient stability label corresponding to each sample in the sample set is taken as the output of the Transformer based on the multi-head attention mechanism.
[0025] Further, the deep residual network comprises n residual modules, wherein n is a natural number not less than 3.
[0026] The deep residual network processes the three-channel pixelized image, comprising:
[0027] The obtained three-channel pixelized image is taken as the input for standard convolution processing to obtain a standard convolution result.
[0028] The standard convolution result is subjected to maximum pooling to obtain a maximum pooling result.
[0029] In the residual path, the maximum pooling result is taken as the input, sequentially passes through N1 first residual modules connected in series, and generates a first residual module group processing result.
[0030] The i-th residual module group processing result is taken as the input, sequentially passes through N (i+1) The (i+1)th residual module connected in series, and generates the (i+1)th residual module group processing result, wherein i is greater than or equal to 1 and less than n.
[0031] The generated n-th residual module group processing result is taken as the matrix feature map output after being processed by the deep residual network.
[0032] Further, the Transformer based on the multi-head attention mechanism comprises a plurality of Transformer encoder modules, a position encoding module, and a classification information module.
[0033] The Transformer encoder module comprises a multi-head attention layer, a feedforward network layer, a residual connection unit, and a layer normalization unit.
[0034] Further, the training of the fusion model based on the deep residual network and the Transformer comprises:
[0035] The accuracy, precision, recall, and F1 value based on the confusion matrix are selected to construct evaluation indexes to evaluate the performance of the fusion model.
[0036] In a second aspect, the application provides a power system safety and stability rapid evaluation device, comprising:
[0037] The constructing sample set unit is configured to pixelize the measured or simulated power steady-state characteristic variables, generate an offline three-channel pixelized image, and construct a sample set; the electrical quantity types of the power steady-state characteristic variables include voltage, active power, and reactive power;
[0038] The fusion model training unit is configured to train a fusion model based on a deep residual network and a Transformer using the constructed sample set, and the trained fusion model is used for fast evaluation of power system security and stability;
[0039] The transient stability evaluation unit is configured to pixelize real-time measured power steady-state characteristic variables, generate an online three-channel pixelized image, and process the generated online three-channel pixelized image using the trained fusion model to generate an evaluation conclusion of power system transient stability state.
[0040] In a third aspect, the present application provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the method of the first aspect.
[0041] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS
[0042] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are intended to illustrate preferred embodiments of the present application, and should not be considered limiting of the present application. Moreover, like reference numerals denote like parts throughout the accompanying drawings. In the drawings:
[0043] FIG. 1 is a flowchart of a method for fast evaluation of power system security and stability according to an embodiment of the present application;
[0044] FIG. 2 is a flowchart of a method for fast evaluation of power system security and stability according to another embodiment of the present application;
[0045] FIG. 3A is a schematic diagram of the power grid topology of an IEEE 39-node standard system according to an embodiment of the present application;
[0046] FIG. 3B is a visual display diagram of the three-channel superimposed pixelized image of the IEEE 39-node standard system shown in FIG. 3A;
[0047] FIG. 3C is a visual display diagram of the voltage pixelized image of the IEEE 39-node standard system shown in FIG. 3A;
[0048] FIG. 3D is a visual display diagram of the active power pixelized image of the IEEE 39-node standard system pixelized in FIG. 3A;
[0049] FIG. 3E is a visual display diagram of the reactive power pixelized image of the IEEE 39-node standard system pixelized in FIG. 3A;
[0050] FIG. 4A is a visual display diagram and a partial enlarged view of a voltage pixelized image in voltage pixelization in the embodiment of the present application;
[0051] FIG. 4B is a visual display diagram and a partial enlarged view of an active power pixelized image in active power pixelization in the embodiment of the present application;
[0052] FIG. 4C is a visual display diagram and a partial enlarged view of a reactive power pixelized image in reactive power pixelization in the embodiment of the present application;
[0053] FIG. 5 is a whole structure diagram of a fusion model for transient stability evaluation in the power system security and stability rapid evaluation method of the embodiment of the present application;
[0054] FIG. 6 is a ResNet network structure schematic diagram of the fusion model for transient stability evaluation in the power system security and stability rapid evaluation method of the embodiment of the present application;
[0055] FIG. 7 is a Transformer schematic diagram of the fusion model for transient stability evaluation in the power system security and stability rapid evaluation method of the embodiment of the present application;
[0056] FIG. 8 is a composition schematic diagram of the power system security and stability rapid evaluation device of the embodiment of the present application;
[0057] FIG. 9 is a composition schematic diagram of a terminal applying the power system security and stability rapid evaluation method of the embodiment of the present application. DETAILED DESCRIPTION
[0058] Exemplary embodiments of the present disclosure will be described in greater detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be accurately conveyed to those skilled in the art. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0059] The large-scale grid connection of new energy and the operation of high-proportion power electronic devices have led to a decrease in the inertia of the power system, an increase in the uncertainty of the operating state, a decrease in predictability, and a profound change in the internal mechanism of transient stability.
[0060] Affected by manpower constraints and time costs, the traditional "offline simulation, manual decision-making" pre-plan analysis cannot adapt to the complex and diverse power grid operation environment, and it is increasingly unable to cope with complex and diverse large power grids. Correspondingly, the traditional "pre-plan" safety strategy is also difficult to adapt to the complex and variable operation mode of the power system, and has defects such as low computational efficiency and poor timeliness in solving transient stability evaluation.
[0061] At present, artificial intelligence technology benefits from a large amount of data, mature learning algorithms, and powerful computing power support, and has made technical breakthroughs in the fields of vision, language, and transportation, effectively improving the intelligent level of different industrial fields.
[0062] Referring to the foregoing description, when completing the transient stability evaluation task, the time domain simulation method has strong adaptability, but low timeliness; the direct method is conservative due to the simplification of the physical model. The traditional "pre-plan" safety strategy is difficult to adapt to the complex and variable operation mode, and the data-driven artificial intelligence technology is expected to provide a new technical means for the safety and stability evaluation of the power system.
[0063] The main features of future power grid development are digitalization, informatization, and intelligentization, and advanced artificial intelligence technology is urgently needed to enhance the timeliness of power system situation awareness tasks. Based on data-driven artificial intelligence technology, it has strong perception, prediction and decision-making ability, and effectively combines artificial intelligence technology with power grid regulation system, which can provide effective means to improve the intelligent level of power grid regulation and reduce the work intensity of regulation personnel.
[0064] Therefore, the application provides a power system safety and stability rapid evaluation technical solution, which is an engineering application of deep learning in power grid situation awareness technology, which is beneficial to deepen and improve the power system transient stability evaluation technology, has a wide application prospect, and can bring huge economic and social benefits through upgrading the intelligent power grid regulation system of each level of power management department or each administrative region.
[0065] At present, the Wide-Area Measurement System (WAMS) based on Phasor Measurement Unit (PMU) is increasingly perfect, and the high-speed real-time communication network greatly improves the observability of the power system, providing sufficient data support for the digitalization construction of the power grid.
[0066] The rapid power system safety and stability assessment technology solution provided in this application includes offline and online stages. In the offline stage, structured power data is acquired, an escaping mechanism is constructed, and a deep residual network and a Transformer network are fused to establish a computer image-based fusion model for power system safety and stability assessment. In the online stage, real-time power grid operating parameters are acquired from the power grid control system. These parameters are then escaped to generate multi-channel pixelated images, including voltage, active power, and reactive power pixelated images. The trained computer image-based fusion model processes these multi-channel pixelated images to generate a power system safety and stability assessment conclusion, such as system stability or system instability. Thus, the application of artificial intelligence technology in transient stability assessment tasks offers the advantages of speed and accuracy.
[0067] Specifically, the above-mentioned AI-based rapid assessment method for safety and stability deeply mines the inherent mapping patterns in massive, diverse, and low-value-density power grid operation data to characterize the transient stability boundary of the power system, thereby assessing the transient stability state of the power grid. This method is not limited by the accuracy of physical models, and the perception of the power grid situation can be achieved within milliseconds. It can meet the balance between timeliness and accuracy requirements of online safety assessment, and can be effectively integrated with the power grid control system, providing an effective technical means to improve the intelligence level of power grid situation awareness and reduce the workload of control personnel.
[0068] Implementing the technical solution for rapid assessment of power system safety and stability provided in this application in the power grid control systems operated by power management departments at all levels can improve the level of intelligent power grid situational awareness and reduce the workload of control personnel.
[0069] This method combines artificial intelligence technology with the need for transient stability assessment, and solves key problems in applying artificial intelligence technology in power grid situational awareness tasks, including: how to convert power system operation data into structured data suitable for artificial intelligence technology processing, and what kind of artificial intelligence model and its network structure to establish to solve the problems of uncertainty, vulnerability and openness in actual power grid application scenarios.
[0070] As shown in Figure 1, the power system safety and stability rapid assessment method of this application includes the following steps:
[0071] S100: Pixelate the measured or simulated steady-state characteristic variables of the power system to generate an offline three-channel pixelated image and construct a sample set; the electrical quantity types of the steady-state characteristic variables of the power system include: voltage, active power, and reactive power;
[0072] S200: training a fusion model based on deep residual network and Transformer using the constructed sample set, the trained fusion model being used for fast power system security and stability evaluation;
[0073] S300: pixelizing the real-time measured power steady-state characteristic variables to generate an online three-channel pixelized image; processing the generated online three-channel pixelized image using the trained fusion model to generate an evaluation conclusion of power system transient stability state.
[0074] In the above step S200, a deep residual network (Residual Network, ResNet) and a Transformer based on a multi-head attention mechanism are fused to obtain a fusion model (hereinafter referred to as an artificial intelligence-based fusion model) for fast power system security and stability evaluation. The fusion model can extract features from a multi-channel pixelized image, establish a correlation mapping between the multi-channel pixelized image and the power grid transient stability state, and then quickly evaluate the transient stability of the power system.
[0075] In some embodiments, the overall technical framework of the power system security and stability fast evaluation method is shown in FIG. 2.
[0076] In some embodiments, in step S100, the measured or simulated power steady-state characteristic variables are pixelized to generate an offline three-channel pixelized image, and a sample set is constructed, including the following steps S110A, S110B, S120 and S130.
[0077] S110A: determining the topology model and operation mode of the power grid, setting a typical fault, performing offline time-domain simulation on the power grid, and analyzing the transient stability of the power system.
[0078] The transient stability of the power system is related to various factors such as the operation mode of the power grid and the type of fault. Clearly defining the operation mode of the power grid is the basis for analyzing the transient stability of the power system. The actual operation range of the power grid is generally in the vicinity of the typical operation mode of the power grid, and cannot completely cover all future operation scenarios of the power grid. On the other hand, in actual operation, the probability of system instability after the power grid suffers a fault is relatively low, and the system instability samples measured by the wide-area measurement system are very few, lacking in samples and insufficient in sample size. However, to construct a data-driven fusion model (the aforementioned artificial intelligence-based fusion model), a sample set balancing the data size of system stability samples and system instability samples under diversified power grid operation scenarios is needed as the input of the model to train the model.
[0079] To this end, in addition to obtaining power steady-state characteristic variables through measurement, a pre-constructed time-domain simulation model of the power grid can be used to set a fault (such as a single-phase ground fault, a two-phase short circuit, or a three-phase short circuit, which can usually be set to the fault type or fault degree that causes the most damage in the current typical operating mode) that can cause system instability for any typical power grid operating mode, perform offline simulation on the power grid, generate and obtain each state variable of the power grid when the power grid is stably operating before the fault is injected, and determine and record whether the power system is in an unstable state or a stable state after the fault is injected as the transient stability state evaluation conclusion of the power system. Further, the transient stability label of the sample is set as whether the power system is in an unstable state or a stable state after the fault is injected.
[0080] In this way, in a variety of typical power grid operating scenarios, the fault is set respectively, offline time-domain simulation is performed on the power grid, and the transient stability of the power system is analyzed in the actual operating range of the power grid.
[0081] Typically, by adjusting the system parameters of the time-domain simulation model of the power grid, any of the following diversified typical power grid operating scenarios is achieved: the output of the generator in the system changes; the load level in the system changes.
[0082] S110B: According to the process and conclusion of analyzing the transient stability of the power system in the diversified typical power grid operating mode, select a plurality of electrical quantities for characterizing the transient stability of the system as power steady-state characteristic variables from the measured or simulated state variables.
[0083] Table 1: Power steady-state characteristic variables
[0084] As shown in Table 1, the electrical quantity types of the power steady-state characteristic variables include voltage, active power, and reactive power; the node types or element types for setting the power steady-state characteristic variables include bus, line, generator, and load; and the power steady-state characteristic variables include: bus voltage; line active power and line reactive power; generator active power and generator reactive power; and load active power and load reactive power.
[0085] According to each set of steady-state characteristic variables obtained by analyzing the transient stability of the power system in the diversified typical power grid operating mode, data preprocessing is performed for subsequent pixelization processing.
[0086] Specifically, data preprocessing includes conversion to per-unit value and interpolation for missing data. Data preprocessing is performed on each set of steady-state characteristic variables obtained in each typical power grid operating mode, and will not be described again.
[0087] Further, after data preprocessing, each steady-state characteristic variable in the typical power grid operation mode and the transient stability label after fault injection are combined as a sample to supplement the sample set.
[0088] Further, when constructing the sample set, the ratio of the number of samples with system stability label to the number of samples with system instability label is adjusted according to engineering experience, so that the data amount corresponding to the system stability label is balanced with the data amount corresponding to the system instability label, which is beneficial to ensure the accuracy and generalization ability of the data-driven fusion model.
[0089] Above, for each state variable in the typical operation scenario generated by simulation, the key state variable affecting the transient stability of the power system is selected as the power steady-state characteristic variable and is preprocessed to obtain each sample, and a sample set with balanced data amount corresponding to the system stability label and the system instability label is constructed.
[0090] The planar image refers to a planar graph with MxN pixel points at a specified resolution; it can be a grayscale image or a color image. When it is a grayscale image, it is a single-channel image, and the pixel value of each pixel point in the image ranges from 0 to 255. When it is a color image, the image is a three-channel image. The color image can be an RGB color model, a CMY and CMYK color model, or an HSI color model. When the RGB color model is used, the pixel value of each pixel point in the R channel, G channel, and B channel ranges from 0 to 255. The color image of any color model can have color in the sense of human vision when displayed on a display screen.
[0091] As shown in FIG. 2 and FIG. 5, the power steady-state characteristic variables obtained under each typical power grid operation mode in the sample set are pixelated and used as the input of the fusion model.
[0092] In this way, the power steady-state characteristic variables related to the transient stability of the power system are selected, pixelated, and input into the fusion model for training of the fusion model.
[0093] It should be understood that the number of channels or dimensions or the amount of data of the input of the data-driven fusion model remains consistent in the three stages of model training, model performance evaluation, and online transient stability evaluation (i.e., online application).
[0094] S120: According to the power grid topology, the power grid is pixelated using an escape mechanism, and each element of the power grid is mapped to each planar graph in the basic image, which includes a non-bus basic image and a bus basic image.
[0095] Specifically, based on the power grid topology diagram shown in FIG. 3A, the non-bus base image (such as FIG. 3D or FIG. 3E) and the bus base image (such as FIG. 3C) corresponding to the power grid topology diagram are generated by using the escape mechanism.
[0096] As shown in FIG. 3A, the power grid topology diagram is a planar image with MxN pixel points at a specified resolution. Specifically, the non-bus base image and the bus base image correspond to the power grid topology diagram, including that the resolution of the non-bus base image and the bus base image is proportional to the resolution of the power grid topology diagram, and the number of pixel points in the width direction and the height direction of the non-bus base image and the bus base image is proportional to the number of pixel points in the width direction and the height direction of the power grid topology diagram, respectively. Naturally, the non-bus base image and the bus base image can be grayscale images or color images.
[0097] In some embodiments, according to the power grid topology, the power grid is pixelated by using the escape mechanism, including:
[0098] Based on the power grid topology diagram shown in FIG. 3A, the positions of the bus, the line, the generator and the load in the power grid topology diagram are determined;
[0099] According to the determined position of the generator in the power grid topology diagram, each generator is mapped as a first pattern, such as a rectangle with m1 pixel points, in the non-bus base image, and the pixel value of each pixel point in the rectangle is a first preset value or a random value, specifically, it can be zero.
[0100] According to the determined position of the load in the power grid topology diagram, each load is mapped as a second pattern, such as a rectangle with m2 pixel points, in the non-bus base image, and the pixel value of each pixel point in the rectangle is a second preset value or a random value, specifically, it can be zero.
[0101] According to the determined position of the line in the power grid topology diagram, each line is mapped as a third pattern, such as a polygon with m3 pixel points, in the non-bus base image, and the pixel value of each pixel point in the polygon is a third preset value or a random value, specifically, it can be zero.
[0102] According to the determined position of the bus in the power grid topology diagram, each bus is mapped as a fourth pattern, such as a rectangle with m4 pixel points, in the bus base image, and the pixel value of each pixel point in the rectangle is a fourth preset value or a random value, specifically, it can be zero.
[0103] It should be understood that in the escape mechanism, the values of the variables m1, m2, m3, and m4 representing the shape or size of the planar graph of different elements can be adaptively adjusted according to the size of the pixelated image and the customization requirements to have better visual display effects.
[0104] Preferably, the aforementioned preset first value, second value, third value, and fourth value are different from each other. In this way, in the non-bus base image, the generators, loads, and lines have different pixel values, and have better visual differentiation and visual display effects.
[0105] Further, after superimposing the non-bus base image and the bus base image, the overall base image is obtained. In the overall base image, the bus generators, loads, and lines have different pixel values, and have good visual differentiation and visual display effects. Comparing the power grid topology diagram with the overall base image is beneficial to checking the accuracy of the escape mechanism.
[0106] Preferably, the value of m2 of the second graph is equal to the value of m1 of the first graph, which can simplify the operation and improve the processing speed without affecting the display effect and visual effect.
[0107] In some embodiments, the positions of the bus, line, generator, and load in the power grid topology diagram can be expressed by coordinates. For example, taking the upper left corner of the power grid topology diagram as the coordinate origin, the left-right direction as the width direction, and the up-down direction as the height direction, the absolute positions of the bus, line, generator, and load in the power grid topology diagram can be expressed by height coordinates and width coordinates. Alternatively, taking a certain element of the power grid topology diagram as a reference, the relative positions of the bus, line, generator, and load in the power grid topology diagram can be expressed according to the relative positions of other elements with respect to the reference.
[0108] In some embodiments, the positions of the elements in the power grid and the connection relationships between the elements are extracted, or the power grid topology diagram is obtained, and the positions of the elements in the power grid topology diagram and the relative positions between the elements are extracted. Referring to the foregoing description, the element type is any one of the following: bus, line, generator, and load. A power grid escape coordinate system is established, escape coordinates of the elements are generated, and the elements are distributed in the planar graph.
[0109] Specifically, the power grid coverage and the elements in the power grid are displayed in a planar graph with a preset size (the background is a preset pixel value, such as blue in the RGB color model in FIG. 3C, FIG. 3D, or FIG. 3E), and each element or node is displayed in a preset planar graph (such as a rectangle, rhombus, trapezoid, or parallelogram).
[0110] Corresponding to Fig. 3A, plane patterns corresponding to M1 buses are shown in Fig. 3C, pixel values of each plane pattern correspond to voltage values of the bus, each bus is displayed as a horizontal line segment with a line width of A, and the length of the line segment corresponds to the length of the bus in the IEEE39 node standard diagram.
[0111] Corresponding to Fig. 3A, plane patterns corresponding to M2 lines are shown in Fig. 3D, pixel values of each plane pattern correspond to active power values on the line, each line is displayed as a combination of vertical line segments and / or horizontal line segments with a line width of B, and the length of the line segment corresponds to the length of the line; corresponding to Fig. 3A, plane patterns corresponding to M2 lines are shown in Fig. 3E, pixel values of each plane pattern correspond to reactive power values on the line.
[0112] Corresponding to Fig. 3A, plane patterns corresponding to M3 generators are shown in Fig. 3D, pixel values of each plane pattern correspond to active power values of the generator (emitted), and the generator is displayed as a square with a side length of C1, and the coverage range of the plane pattern corresponding to each generator is determined according to the rated power of the generator or the side length C1; plane patterns corresponding to M3 generators are shown in Fig. 3E, pixel values of each plane pattern correspond to reactive power values of the generator (emitted).
[0113] Corresponding to Fig. 3A, plane patterns corresponding to M4 loads are shown in Fig. 3D, pixel values of each plane pattern correspond to active power values of the load (consumed), and the load is displayed as a square with a side length of C2, and the coverage range of the plane pattern corresponding to the load is determined according to the rated power of the load or the side length C2; plane patterns corresponding to M4 loads are shown in Fig. 3E, pixel values of each plane pattern correspond to reactive power values of the load (consumed).
[0114] As shown in Fig. 3D and Fig. 3E, each generator and each load is connected at one end of a line.
[0115] S130: mapping the power steady-state characteristic variables to the non-bus base image to generate an active power pixelized image and a reactive power pixelized image, and mapping the power steady-state characteristic variables to the bus base image to generate a voltage pixelized image.
[0116] Specifically, mapping the power steady-state characteristic variables to the non-bus base image to generate an active power pixelized image includes:
[0117] The active power values of each line, the active power values of each generator, and the active power values of each load in the obtained power steady-state characteristic variables are respectively mapped to pixel values of plane patterns corresponding to each element;
[0118] In the non-bus base image, the pixel values of the pixel points in the planar graph corresponding to each line, each generator and each load are updated respectively to obtain an active power pixelized image.
[0119] Thus, in the active power pixelized image, the pixel values of the pixel points in the planar graph corresponding to each generator or load correspond to the active power values of each line, each generator and each load in the power steady-state characteristic variables.
[0120] Specifically, the power steady-state characteristic variables are mapped to the non-bus base image to generate a reactive power pixelized image, including:
[0121] The reactive power values of each line, each generator and each load in the obtained power steady-state characteristic variables are mapped to the pixel values of the planar graph corresponding to each element respectively;
[0122] In the non-bus base image, the pixel values of the pixel points in the planar graph corresponding to each line, each generator and each load are updated respectively to obtain a reactive power pixelized image.
[0123] Thus, in the reactive power pixelized image, the pixel values of the pixel points in the planar graph corresponding to each generator or load correspond to the reactive power values of each line, each generator and each load in the power steady-state characteristic variables.
[0124] Specifically, the power steady-state characteristic variables are mapped to the bus base image to generate a voltage pixelized image, including:
[0125] The voltage values of each bus in the obtained power steady-state characteristic variables are mapped to the pixel values of the planar graph corresponding to each bus respectively;
[0126] In the bus base image, the pixel values of the pixel points in the planar graph corresponding to each bus are updated respectively to obtain a voltage pixelized image.
[0127] Thus, in the voltage pixelized image, the pixel values of the pixel points in the planar graph corresponding to each bus correspond to the voltage values of each bus in the power steady-state characteristic variables.
[0128] Further, the pixel values of the pixel points in the voltage pixelized image are converted into corresponding visual colors in a color scheme in a preset RGB color model to obtain a visual display diagram as shown in FIG. 3C.
[0129] Further, the pixel values of the pixel points in the active power pixelized image are converted into corresponding visual colors in a color scheme in a preset RGB color model to obtain a visual display diagram as shown in FIG. 3D.
[0130] Further, the pixel values of each pixel point in the reactive power pixelized image are converted into corresponding visual colors in a color scheme in a preset RGB color model to obtain a visual display diagram as shown in FIG. 3E.
[0131] According to the power grid topology and the escape mechanism, each element in the power grid is mapped into a planar graph in the base image, and each electrical quantity in the power steady-state characteristic variable is mapped into a pixel value of the corresponding planar graph according to the element type, and the reactive power pixelized image, the active power pixelized image, and the voltage pixelized image are obtained by updating. In this way, each steady-state characteristic variable is pixelized into three different channel computer images, namely the reactive power pixelized image, the active power pixelized image, and the voltage pixelized image.
[0132] According to the foregoing description, the fusion model based on artificial intelligence can quickly and efficiently process computer images and extract features of the computer images, and therefore, pixelizing the power steady-state characteristic variable is conducive to exerting the performance of the fusion model.
[0133] In some embodiments, the steady-state characteristic variable pixelization includes: mapping the voltage value in the steady-state characteristic variable corresponding to each element into a pixel value corresponding to the planar image, and updating the voltage pixelized image according to each pixel value;
[0134] mapping the active power value in the steady-state characteristic variable corresponding to each element into a pixel value corresponding to the planar image, and updating the active power pixelized image according to each pixel value;
[0135] mapping the reactive power value in the steady-state characteristic variable corresponding to each element into a pixel value corresponding to the planar image, and updating the reactive power pixelized image according to each pixel value.
[0136] In this way, the voltage pixelized image records the planar graphs corresponding to M1 buses, each planar graph corresponding to a bus has a center coordinate and a coverage area, and the pixel value of each planar graph corresponding to a bus is obtained by mapping the voltage value of the bus.
[0137] In this way, the active power pixelized image records the planar graphs corresponding to M2 lines, each planar graph corresponding to a line has a center coordinate and a coverage area, and the pixel value of each planar graph corresponding to a line is obtained by mapping the active power value of the line; the active power pixelized image records the planar graphs corresponding to M3 generators, each planar graph corresponding to a generator has a center coordinate and a coverage area, and the pixel value of each planar graph corresponding to a generator is obtained by mapping the active power value of the generator; and the active power pixelized image records the planar graphs corresponding to M4 loads, each planar graph corresponding to a load has a center coordinate and a coverage area, and the pixel value of each planar graph corresponding to a load is obtained by mapping the active power value of the load.
[0138] Thus, the reactive power pixelized image records plane graphs corresponding to the M2 lines respectively, each plane graph corresponding to the line has a center coordinate and a coverage area, and the pixel value of each plane graph corresponding to the line is obtained by mapping according to the reactive power value of each line; the reactive power pixelized image records plane graphs corresponding to the M3 generators respectively, each plane graph corresponding to the generator has a center coordinate and a coverage area, and the pixel value of each plane graph corresponding to the generator is obtained by mapping according to the reactive power value of each generator; the reactive power pixelized image records plane graphs corresponding to the M4 loads, each plane graph corresponding to the load has a center coordinate and a coverage area, and the pixel value of each plane graph corresponding to the load is obtained by mapping according to the reactive power value of each load.
[0139] Taking the IEEE 39-node standard system shown in FIG. 3A as an example, the visualized image after the pixelization processing of the IEEE 39-node standard system is shown in FIG. 3C, FIG. 3D and FIG. 3E. In the voltage pixelized image shown in FIG. 3C, a plurality of bus nodes or bus elements are displayed, and the pixel value of each pixel point in each bus node or bus element corresponds to the voltage value borne by each bus. In the active power pixelized image shown in FIG. 3D, a plurality of lines, generators and load nodes are displayed, and the pixel value of each pixel point in each node corresponds to the active power value borne by each line, generator or load bus. In the reactive power pixelized image shown in FIG. 3E, a plurality of lines, generators and load nodes are displayed, and the pixel value of each pixel point in each node corresponds to the reactive power value borne by each line, generator or load bus.
[0140] Taking the voltage pixelized image, the active power pixelized image and the reactive power pixelized image shown in FIG. 4A, FIG. 4B and FIG. 4C as examples, the escape mechanism and the pixelization processing are further specifically explained.
[0141] The part (having four pixel values) in the white dotted rectangular frame in the right middle area in the left voltage pixelized image in FIG. 4A is enlarged and displayed as a 17x17 matrix on the right. The matrix corresponds to 17x17 pixel points, and the pixel value of each pixel point corresponds to the voltage value borne by the bus node or bus element where the pixel point is located. Among them, the pixel value 0 corresponds to the background color; the pixel values 0.8, 0.6 and 0.7 correspond to other three colors respectively.
[0142] The part (with 5 pixel values) in the white dotted rectangular frame in the upper right area of the left voltage pixelized image in FIG. 4B is enlarged and shown as a 17x17 matrix on the right. The matrix corresponds to 17x17 pixel points, and the pixel value of each pixel point corresponds to the active power value borne by the line, generator or load node. Among them, the pixel value 0 corresponds to the background color; the pixel values 0.9, 0.7, 0.6 and 0.4 correspond to the other four colors respectively.
[0143] The part (with 5 pixel values) in the white dotted rectangular frame in the upper right area of the left voltage pixelized image in FIG. 4C is enlarged and shown as a 17x17 matrix on the right. The matrix corresponds to 17x17 pixel points, and the pixel value of each pixel point corresponds to the reactive power value borne by the line, generator or load node. Among them, the pixel value 0 corresponds to the background color; the pixel values 0.8, 0.7, 0.5 and 0.8 correspond to the other four colors respectively.
[0144] After the pixelization processing, each group of three pixelized images, including the active power pixelized image, the reactive power pixelized image and the voltage pixelized image, contains the size information of the steady-state characteristic variables and the power grid topology information, which can reflect the spatial distribution of system voltage, active and reactive power.
[0145] In this way, through the escape mechanism, each element is arranged in the bus base image and the non-bus base image according to its relative position in the power grid topology; through the above, the power steady-state characteristic variables (voltage, active power and reactive power) are converted into the pixel value of each pixel point, so that the power grid topology information and the size information of the power steady-state characteristic variables can be recorded in the three pixelized images in each group in the shape and pixel value of each element in the pixelized image. Naturally, when the size of the power grid steady-state characteristic variable changes, the corresponding pixelized image will also change accordingly.
[0146] When the active power pixelized image, the reactive power pixelized image and the voltage pixelized image are stored in structured data, each group of three pixelized images can be represented by a high-dimensional array (h, w, c, v), and any pixel point can be corresponded by an element of the high-dimensional array, and each element has the form (h, w, c, v). Among them, w represents the horizontal coordinate (such as the width direction mentioned above) of the pixel point, h represents the vertical coordinate (such as the height direction mentioned above) of the pixel point, c represents the channel where the pixel point is located (such as c being 0, 1 or 2, as mentioned above, the voltage pixelized image corresponds to 0, the active power pixelized image corresponds to 1, and the reactive power pixelized image corresponds to 2); v represents the pixel value of the pixel point.
[0147] Thus, the above steps are repeated to pixelize the steady-state characteristic variables obtained under each typical power grid operating mode in the sample set, and three pixelized images in a group, i.e., active power pixelized images, reactive power pixelized images, and voltage pixelized images, are generated. Each group of three pixelized images is taken as a three-channel pixelized image, and a high-dimensional array is used for data structuring. The obtained high-dimensional array can be used for subsequent construction of a fusion model, training of the fusion model, and prediction of the stability of the power system using the trained fusion model.
[0148] In the above, the power grid topology and the power steady-state characteristic variables are pixelized to generate the input of the fusion model, which is one of the bases of the overall technical framework. The purpose of pixelization is to convert the power grid topology or the power steady-state characteristic variables into image data. This is because the image data is conducive to the excellent image processing performance of the fusion model and its learning algorithm.
[0149] In the following steps, the high-dimensional array or the three-channel pixelized image corresponding to each sample in the sample set is taken as the input of the fusion model, and the transient stability label corresponding to each sample in the sample set is taken as the output of the fusion model, so as to train the fusion model through supervised learning.
[0150] Rectified Linear Unit, abbreviated as ReLU, is a commonly used activation function in neural networks. In the general sense, it refers to a ramp function in mathematics.
[0151] In some embodiments, step S200 uses the constructed sample set to train the fusion model based on the deep residual network and the Transformer, including steps S210 and S220.
[0152] Specifically, in step S210, the ResNet and the Transformer are fused to obtain the framework of the fusion model, including:
[0153] The sample set is divided into a training set and a test set, for example, the training set accounts for 80% of the number of samples in the sample set, and the test set accounts for 20% of the number of samples in the sample set;
[0154] The high-dimensional array or the three-channel pixelized image corresponding to each sample in the sample set is taken as the input of the deep residual network, the matrix feature map generated by the deep residual network is taken as the input of the Transformer based on the multi-head attention mechanism, and the transient stability label corresponding to each sample in the sample set is taken as the output of the Transformer, i.e., the output of the fusion model.
[0155] Specifically, in step S220, the fusion model is trained using the sample set constructed in the foregoing steps to establish a correlation mapping between the multi-channel pixelized image and the transient stability state of the power grid, and the mapping relationship between the power steady-state characteristic variable and the transient stability of the power grid is established by the constructed fusion model.
[0156] As shown in FIGS. 5 and 6, after the input data (such as the three-channel pixelized image or the high-dimensional array as described above) is processed by the ResNet, a process matrix feature map is output. Compared with the input three-channel pixelized image or high-dimensional array, the resolution of the image is reduced and the number of convolution kernel channels is increased.
[0157] Taking a three-channel pixelized image with 128x128x3 pixels as an example, after being processed by the ResNet50, the generated matrix feature map or the output process matrix feature map is 8x8x1024.
[0158] As shown in FIGS. 5 and 7, the process matrix feature map output by the ResNet is input into the Transformer encoder to calculate the final classification result, which includes transient stability labels such as system stability and system instability.
[0159] As shown in FIG. 6, in the ResNet, the identity mapping structure in each residual module includes an identity mapping across the short connection between layers, such as the identity mapping paths shown in each solid or dashed box in FIG. 6, in which the matrix feature map input is connected across the short connection between layers to the matrix feature map generated by the residual path. The identity mapping structure across the short connection between layers outputs the input matrix feature map identically and adds it to the matrix feature map from the residual path. After processing by the ReLU activation function, the matrix feature map processed by the residual module is generated.
[0160] In this way, the deep residual network ResNet50 can convert the complex function fitting problem into a residual function solving problem by increasing the identity mapping across the short connection between layers, so that the gradient always exists during the back propagation operation, which can effectively avoid the training difficulty or gradient disappearance problem caused by too deep network layers.
[0161] As shown in the upper part of FIG. 6, from left to right, the first residual module, the second residual module of the down-sampling type (such as convolution with a stride of 2), and the third residual module of the down-sampling type (such as convolution with a stride of 2) are respectively shown in the three dashed boxes. In the residual module of the down-sampling type, the identity mapping path is implemented through a convolution layer. The input matrix feature map is output through the identity mapping path provided with the convolution layer, and is added to the matrix feature map output by the residual path, so that the number of pixels of the matrix feature map is halved, realizing down-sampling.
[0162] Specifically, the identity mapping path with the convolution layer and the residual connection are calculated by the following formula: y = F(x, W) + x (1) F(x, W) = W2 x ReLU(W1x) (2)
[0163] In the formula, x is an input parameter or an input matrix feature map, and y is a parameter or a matrix feature map output by the residual structure; W, W1 and W2 are network parameters whose values need to be determined through learning when the neural network is trained in a supervised manner.
[0164] Referring to the foregoing description, the three-channel pixelized images are respectively a voltage pixelized image, an active power pixelized image and a reactive power pixelized image. In some embodiments, each pixelized image shown in FIGS. 3C, 3D and 3E is taken as an example with 128 x 128 pixels. As shown in the power grid topology diagram in FIG. 3A, there are 10 generators, 46 lines and 39 buses.
[0165] As shown in FIG. 6, the three-channel pixelized image is taken as a matrix feature map as data or input, and is processed by the deep residual network, including:
[0166] The input matrix feature map is processed by standard convolution (Stdconv, 7 x 7, 64) to obtain a standard convolution result, where the convolution kernel size is 7 x 7, the output channel is adjusted to 64, and the stride is 2;
[0167] The standard convolution result is processed by maximum pooling (maxpool 3 x 3) to obtain a maximum pooling result, where the stride is 2;
[0168] In the residual path, the maximum pooling result is taken as input, sequentially passes through N1 first residual modules in series, and generates a first residual module group processing result;
[0169] In the residual path, the first residual module group processing result is taken as input, sequentially passes through N2 second residual modules in series, and generates a second residual module group processing result;
[0170] In the residual path, the second residual module group processing result is taken as input, sequentially passes through N3 third residual modules in series, and generates a third residual module group processing result as the output matrix feature map after deep residual network processing.
[0171] Specifically, as shown in FIG. 6, the input matrix feature map passes through the first residual module, including:
[0172] The input matrix feature map is subjected to first layer convolution (such as Conv2d, 1x1, 64) with a stride of 1, a convolution kernel size of 1x1, and a channel number of 64 to generate a first layer convolution result;
[0173] The first layer convolution result is processed by using a ReLU activation function to obtain a first activation result;
[0174] The first activation result is subjected to second layer convolution (such as Conv2d, 3x3, 64) with a stride of 1, a convolution kernel size of 3x3, and a channel number of 64 to generate a second layer convolution result;
[0175] The second layer convolution result is processed by using a ReLU activation function to obtain a second activation result;
[0176] The second activation result is subjected to third layer convolution (such as Conv2d, 1x1, 256) with a stride of 1, a convolution kernel size of 1x1, and a channel number of 256 to generate a third layer convolution result;
[0177] The input matrix feature map is subjected to identity mapping convolution (such as Conv2d, 1x1, 256) with a stride of 1, a convolution kernel size of 1x1, and a channel number of 256 to generate an identity mapping convolution result;
[0178] The third layer convolution result and the identity mapping convolution result are combined, and then processed by using a ReLU activation function to generate a first residual module group processing result as a matrix feature map corresponding to the input matrix feature map. In this way, after the first residual module processing, the resolution of the image is reduced, and the convolution kernel channel number is increased.
[0179] In the above first residual module, the 1x1 convolution kernel is used to conveniently adjust the channel number of the intermediate layer. Before entering the 3x3 convolution layer, the channel number is reduced (256->64), and after passing through the 3x3 convolution layer, the channel number is restored (64->256), which can significantly reduce the parameter amount of the network.
[0180] Specifically, as shown in FIG. 6, the input matrix feature map is subjected to a second residual module, including:
[0181] The input matrix feature map is subjected to first layer convolution (such as Conv2d, 1x1, 128) with a stride of 1, a convolution kernel size of 1x1, and a channel number of 128 to generate a first layer convolution result;
[0182] The first layer convolution result is processed by using a ReLU activation function to obtain a first activation result;
[0183] The first activation result is processed by a ReLU activation function to obtain a second activation result.
[0184] The second activation result is processed by a ReLU activation function to obtain a third activation result.
[0185] The third activation result is processed by a ReLU activation function to obtain a fourth activation result.
[0186] The input matrix feature map is processed by an identity mapping convolution (such as Conv2d, 1x1, 512) with a stride of 1 to generate an identity mapping convolution result.
[0187] The third activation result and the identity mapping convolution result are combined, and then processed by a ReLU activation function to generate a second residual module group processing result as a matrix feature map corresponding to the input matrix feature map. In this way, after the second residual module processing, the data is reduced in dimension.
[0188] In the above second residual module, the 1x1 convolution kernel is used to conveniently adjust the number of channels of the intermediate layer. Before entering the 3x3 convolution layer, the number of channels is reduced (512->128), and after passing through the 3x3 convolution layer, the number of channels is restored (128->512), which can significantly reduce the parameter amount of the network.
[0189] Specifically, as shown in FIG. 6, the third residual module includes:
[0190] The input matrix feature map is processed by a first convolution (such as Conv2d, 1x1, 256) with a stride of 1 to generate a first convolution result.
[0191] The first convolution result is processed by a ReLU activation function to obtain a first activation result.
[0192] The first activation result is processed by a second convolution (such as Conv2d, 3x3, 256) with a stride of 2 to generate a second convolution result.
[0193] The second convolution result is processed by a ReLU activation function to obtain a second activation result.
[0194] Stride 1 is used to perform the third layer convolution (such as Conv2d, 1x1, 1024) on the second activation result, the convolution kernel size is 1x1, the channel number is 1024, and the third layer convolution result is generated;
[0195] Stride 2 is used to perform the identity mapping convolution (such as Conv2d, 1x1, 1024) on the input matrix feature map on the identity mapping path, the convolution kernel size is 1x1, the channel number is 1024, and the identity mapping convolution result is generated;
[0196] After the third layer convolution result and the identity mapping convolution result are combined, the ReLU activation function is used for processing, and the third residual module group processing result is generated as the matrix feature map corresponding to the input matrix feature map. In this way, after the input matrix feature map is processed by the third residual module, the resolution of the image is reduced and the convolution kernel channel number is increased.
[0197] In the above third residual module, the 1x1 convolution kernel is used to conveniently adjust the channel number of the intermediate layer. Before entering the 3x3 convolution layer, the channel number is reduced (1024->256), and after passing through the 3x3 convolution layer, the channel number is restored (256->1024), which can significantly reduce the parameter amount of the network.
[0198] Referring to FIG. 6, the channel number of each convolution layer in the second residual module is twice the channel number of each convolution layer in the first residual module; the channel number of each convolution layer in the third residual module is twice the channel number of each convolution layer in the second residual module, which is beneficial to enhance the feature extraction capability, extract more advanced features related to the class, and increase the complexity and expression capability of the model.
[0199] Naturally, the deep residual network ResNet can include more than 3 residual modules, and the residual paths and identity mapping paths of other residual modules can be implemented by referring to the first residual module, the second residual module, or the third residual module shown in FIG. 6, which will not be described again.
[0200] Further, on the residual path, the maximum pooling result is taken as the input, sequentially passes through N1 first residual modules in series, and generates a first residual module group processing result, including:
[0201] On the residual path, the maximum pooling result or the previous first residual module group processing result is taken as the input, sequentially passes through N1 first residual modules in series, and the N1 first residual module processing result is taken as the first residual module group processing result.
[0202] As shown in FIG. 6, the maximum pooling result is taken as the input, sequentially passes through (1+2) first residual modules, and generates a first residual module group processing result, which will not be described again.
[0203] Further, on the residual path, the first residual module processing result or the previous second residual module processing result is taken as input, sequentially passing through N2 second residual modules in series, and the N2th second residual module processing result is taken as the second residual module group processing result.
[0204] As shown in FIG. 6, the first residual module group processing result is taken as input, sequentially passing through (1+3) second residual modules in series to generate the second residual module group processing result, which will not be repeated here.
[0205] Further, on the residual path, the second residual module group processing result is taken as input, sequentially passing through N3 third residual modules to generate the third residual module group processing result, including:
[0206] On the residual path, the second residual module group processing result or the previous third residual module processing result is taken as input, sequentially passing through N3 third residual modules, and the N3th third residual module processing result is taken as the third residual module group processing result.
[0207] As shown in FIG. 6, the second residual module group processing result is taken as input, sequentially passing through (1+8) third residual modules to generate the third residual module group processing result, which will not be repeated here.
[0208] In this way, ResNet can select the feature variables with high correlation with power grid transient stability to form an optimal feature set and output in the form of a multi-dimensional feature map (such as 8x8x1024).
[0209] For the classification problem of power grid transient stability evaluation, as shown in FIG. 7, the Transformer includes multiple Transformer encoder modules, a position encoding module (Position Embedding), and a classification information module. The position encoding module can help the model identify the position relationship in the feature vector; the classification information module is used to provide the classification relationship of 1x192 in the feature vector. Specifically, the classification information is a learnable parameter used to store data information related to classification.
[0210] As shown in FIG. 5 and FIG. 7, the Transformer encoder module includes a multi-head attention layer, a feedforward network layer, a residual connection unit, and a layer normalization unit, and the core is a multi-head attention mechanism. The multi-head attention mechanism uses adaptive attention weight distribution to make the model divide into multiple subspaces, and then pay attention to different aspects of power system transient stability feature information (or transient stability information). Finally, the transient stability information of each aspect is integrated, so that it has a global receptive field, can effectively calculate the attention between each transient stability feature, assign high weights to high-value information of transient stability, and realize efficient allocation of information processing resources.
[0211] The adaptive attention weight distribution Attention(Q, K, V) reflects the correlation between the output data of the Transformer encoder and the input matrix feature map (as shown in FIG. 5 or FIG. 7, the matrix feature map has a dimension of 8x8x1024 after being processed by ResNet50) and the value degree of the feature. The calculation formula is as follows: MultiHead(Q, K, V) = [H1,..., Hh] h ]W O (6)
[0212] Among them, the query matrix Q, the key matrix K, and the value degree matrix V are respectively generated by transforming the feature vector matrix X, W Q , W K , and W V are linear transformation matrices; d is a scaling factor, and is the length of the row vector in the key matrix K;
[0213] W Q i , W K i , and W V i are conversion matrices for projecting the Q, K, and V matrices into the i-th subspace, i = 1, 2,..., h, and h is the total number of subspaces (the total number of subspaces is a pre-set model parameter);
[0214] H i is the single-head attention value of the i-th subspace; MultiHead(Q, K, V) integrates the transient stability information of each aspect, W O is a conversion matrix used to connect the attention values of all subspaces.
[0215] In the Layer Norm unit, the mean and variance are shared by each neuron in a layer, which normalizes the layer input to a standard normal distribution, and helps to enhance the flow of backpropagation information.
[0216] As shown in FIG. 5 and FIG. 7, each computer image is processed by a residual connection unit and a Layer Norm unit after passing through the multi-head attention layer and the feedforward network layer.
[0217] As shown in FIG. 5 and FIG. 7, the residual connection unit is an identity mapping type, which can make the gradient transmission more efficient and avoid model degradation.
[0218] Specifically, the fusion model based on ResNet and Transformer is trained, including:
[0219] The sample set is input into the constructed fusion model based on ResNet and Transformer for training until the model converges. Specifically, the loss function adopts a cross-entropy loss function for classification, and the optimization method adopts a gradient descent method. With multiple training of the model, the optimization method performs global minimization optimization on the loss function until the model converges.
[0220] When training the fusion model based on ResNet and Transformer, evaluation indicators are used to test and evaluate the effect of the fusion model for power system transient stability evaluation, which is used to guide online application or model optimization update of the model.
[0221] In order to evaluate the performance and effectiveness of the fusion model, accuracy, precision, recall and F1 value based on the confusion matrix are selected to construct evaluation indicators.
[0222] The accuracy accuracy indicates the number of correctly predicted unstable and stable samples and the proportion of the total number of samples in the training set or test set, and is used to indicate the overall accuracy. The precision precision indicates the proportion of the number of correctly predicted unstable samples to the total number of all predicted unstable samples. The recall indicates the proportion of the number of correctly predicted unstable samples (predicting unstable samples as unstable conclusion) to the total number of unstable samples. The F1 value indicates the harmonic mean of the precision and recall of unstable samples, which focuses on the unstable sample scenario.
[0223] The calculation formulas of the evaluation indicators are as follows:
[0224] In the formula, TP represents a stable sample judged correctly (a stable sample is predicted as system stability) ; TN represents an unstable sample judged correctly (an unstable sample is predicted as system instability) ; FP represents an unstable sample predicted incorrectly or wrongly; and FN represents a stable sample predicted incorrectly or wrongly.
[0225] Specifically, the fusion model based on ResNet and Transformer is evaluated, including:
[0226] Based on the established evaluation index, the fusion model trained offline is tested on the test set; when the evaluation index value (generated by using the foregoing evaluation index) of the model in the test set meets the pre-set threshold, the trained fusion model is applied online.
[0227] In some embodiments, in step S300, the real-time measured power steady-state characteristic variable is pixelated to generate an online three-channel pixelated image; the generated online three-channel pixelated image is processed by using the trained fusion model to generate a power system transient stability state evaluation conclusion.
[0228] Specifically, in the online application process of the fusion model, the power steady-state characteristic variable measured and acquired from the wide-area measurement system is converted into a pixelated image and input to the trained fusion model for power system transient stability evaluation to generate a power system transient stability evaluation conclusion.
[0229] Preferably, the power system transient stability evaluation conclusion generated by the fusion model is sent to the power grid regulation system.
[0230] In summary, the present application combines the artificial intelligence technology with the demand of power system transient stability evaluation, proposes a power system transient stability evaluation method based on power steady-state characteristic variable pixelation and fusion model, clearly defines the conversion mechanism of the power steady-state characteristic variable to the computer image, establishes the fusion model, and proposes a general technical framework of data-conversion-image-model.
[0231] The power system transient stability evaluation method provides practical guidance and help for how the artificial intelligence technology is combined with the power system situation awareness technology, the proposed power steady-state characteristic variable pixelation method is beneficial to fully exert the processing advantages of the artificial intelligence technology on image data, the fusion model combining ResNet and Transformer has strong data mining capability, meets the timeliness and accuracy requirements of online safety evaluation, fully exerts the role of machine intelligence, provides an effective means for improving the intelligent level of power grid regulation and reducing the work intensity of regulation personnel, and has high engineering applicability.
[0232] As shown in FIG. 8, the power system safety and stability rapid evaluation device of the embodiment of the present application includes:
[0233] The sample set construction unit 10 is configured to pixelize the measured or simulated power steady-state characteristic variables, generate an offline three-channel pixelized image, and construct a sample set. The electrical quantity types of the power steady-state characteristic variables include voltage, active power, and reactive power.
[0234] The fusion model training unit 20 is configured to train a fusion model based on a deep residual network and a Transformer by using the constructed sample set. The trained fusion model is used for fast evaluation of power system security and stability.
[0235] The transient stability evaluation unit 30 is configured to pixelize real-time measured power steady-state characteristic variables, generate an online three-channel pixelized image, and process the generated online three-channel pixelized image by using the trained fusion model to generate an evaluation conclusion of power system transient stability.
[0236] The power system security and stability fast evaluation device and the power system security and stability fast evaluation method provided in the embodiments of the present application have the same inventive concept, and can be referred to for implementation, and have the same beneficial effects as the methods used, operated or implemented.
[0237] The embodiments of the present application also provide a terminal for executing the method. Please refer to FIG. 9, which shows a schematic diagram of a terminal according to some embodiments of the present application. As shown in FIG. 9, the terminal 8 includes a processor 800, a memory 801, a bus 802 and a communication interface 803, wherein the processor 800, the communication interface 803 and the memory 801 are connected through the bus 802. The memory 801 stores a computer program executable on the processor 800, and the processor 800 executes the computer program to perform the method provided in any of the embodiments of the present application.
[0238] The memory 801 can include a high-speed random access memory (RAM) and can also include a non-volatile memory such as at least one disk memory. The communication interface 803 can be wired or wireless, and can be used to implement the communication connection between the device network element and at least one other network element, and can use the Internet, a wide area network, a local network, a metropolitan area network, etc.
[0239] The bus 802 can be an ISA bus, a PCI bus, an EISA bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. The memory 801 is configured to store programs, and the processor 800 executes the programs after receiving execution instructions. The method disclosed in any of the embodiments of the present application can be applied to the processor 800 or implemented by the processor 800.
[0240] The processor 800 can be an integrated circuit chip with processing capability. In the implementation process, the steps of the method can be completed by the integrated logic circuit or the instruction of the software form in the processor 800. The processor 800 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), and the like; or can be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or another programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor to execute, or a combination of hardware and software modules in the code processor to execute. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, or other mature storage medium in the art. The storage medium is located in the memory 801, and the processor 800 reads the information in the memory 801 and combines the hardware to complete the steps of the method.
[0241] The terminal provided by the embodiments of the present application and the method of the embodiments of the present application have the same beneficial effects as the method they adopt, run, or implement.
[0242] The embodiments of the present application also provide a computer readable storage medium corresponding to the method provided by the embodiments, which is an optical disc, and a computer program (i.e. program product) is stored on the optical disc. When the computer program is run by a processor, the method provided by any of the embodiments is executed.
[0243] It should be noted that examples of the computer-readable storage medium can also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other optical, magnetic storage medium, which will not be repeated here.
[0244] The computer-readable storage medium provided by the embodiments of the present application has the same beneficial effects as the method adopted, run or implemented by the application program stored therein.
[0245] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application also intends to include these modifications and variations. Industrial applicability
[0246] In the embodiments of the present application, the power system safety and stability rapid assessment technical scheme includes an offline link and an online link. In the offline link, power structured data is acquired, an escape mechanism is constructed, a deep residual network and a Transformer network are fused, a fusion model based on computer images is established, and power system safety and stability assessment is realized. In the online link, power grid operation parameters are acquired from the power grid control system in real time, the acquired power grid operation parameters are escaped, and multi-channel pixelized images such as voltage pixelized images, active power pixelized images and reactive power pixelized images are generated. The trained fusion model based on computer images is used to process the generated multi-channel pixelized images, and a power system safety and stability assessment conclusion such as system stability or system instability is generated. In this way, the safety and stability rapid assessment method based on artificial intelligence can deeply mine the internal mapping rules in massive, multi-type and low value density power grid operation data, depict the transient stability boundary of the power system, and realize the assessment of the transient stability state of the power grid. This method is not limited by the precision of the physical model, the perception of the power grid situation can be realized within milliseconds, can balance the demand of online safety assessment in timeliness and accuracy, can be effectively combined with the power grid control system, and provides an effective technical means for improving the intelligent level of power grid situation awareness and reducing the work intensity of control personnel.
Claims
1. A method for fast power system security and stability assessment, comprising: pixelating measured or simulated power steady-state characteristic variables to generate offline three-channel pixelated images and constructing a sample set; the electrical quantity types of the power steady-state characteristic variables include: voltage, active power, and reactive power; training a fusion model based on a deep residual network and a Transformer using the constructed sample set, and using the trained fusion model for fast power system security and stability assessment; pixelating real-time measured power steady-state characteristic variables to generate online three-channel pixelated images, and using the trained fusion model to process the generated online three-channel pixelated images to generate power system transient stability state assessment conclusions.
2. The method for fast safety and stability assessment of power system as claimed in claim 1 wherein, the pixelating of the measured or simulated power steady-state characteristic variables includes: pixelating the power grid using an escape mechanism according to the power grid topology to map each element of the power grid to a planar figure in a basic image; the basic image includes a non-bus basic image and a bus basic image.
3. The method for fast safety and stability assessment of power system as claimed in claim 2 wherein, the pixelating of the measured or simulated power steady-state characteristic variables to generate offline three-channel pixelated images includes: mapping the power steady-state characteristic variables to the non-bus basic image to generate an active power pixelated image and a reactive power pixelated image, and mapping the power steady-state characteristic variables to the bus basic image to generate a voltage pixelated image; structuring the active power pixelated image, the reactive power pixelated image, and the voltage pixelated image into the offline three-channel pixelated image.
4. The method for fast safety and stability assessment of power system as claimed in claim 3 wherein, the construction of the sample set includes: using a pre-constructed power grid time-domain simulation model to set faults that may cause system instability for multiple typical power grid operating modes, to perform offline simulation on the power grid to obtain state quantities when the power grid is stably operating before the faults are injected; selecting multiple electrical quantities representing system transient stability as power steady-state characteristic variables from the state quantities obtained before the faults are injected when the power grid is stably operating under multiple typical power grid operating modes; pixelating the selected power steady-state characteristic variables to generate multiple sets of offline three-channel pixelated images; combining each set of three-channel pixelated images with its corresponding transient stability label to form each sample to form a sample set.
5. The method for fast safety and stability assessment of power system as claimed in claim 3 wherein, the training of the fusion model based on the deep residual network and the Transformer using the constructed sample set includes: using the three-channel pixelated images corresponding to each sample in the sample set as the input of the deep residual network, using the matrix feature map generated by the deep residual network as the input of the Transformer based on the multi-head attention mechanism, and using the transient stability label corresponding to each sample in the sample set as the output of the Transformer based on the multi-head attention mechanism.
6. The method for fast safety and stability assessment of power system as claimed in claim 5 wherein, the deep residual network includes n residual modules, where n is a natural number not less than 3; the deep residual network processing the three-channel pixelated image includes: performing standard convolution processing on the obtained three-channel pixelated image as input to obtain a standard convolution result; Max-pooling the standard convolution result to obtain a max-pooling result; On the residual path, taking the max-pooling result as input, sequentially passing through N1 first residual modules in series to generate a first residual module group processing result; The i-th residual module group processing result is taken as input, sequentially passes through N (i+1) (i+1)th residual modules in series, to generate an (i+1)th residual module group processing result, where i is greater than or equal to 1 and less than n; Taking the generated n-th residual module group processing result as the matrix feature map output after deep residual network processing.
7. The power system safety and stability rapid evaluation method of claim 5, wherein, The Transformer based on the multi-head attention mechanism comprises a plurality of Transformer encoder modules, a position encoding module, and a classification information module. The Transformer encoder module comprises a multi-head attention layer, a feedforward network layer, a residual connection unit, and a layer normalization unit.
8. The method for fast safety and stability assessment of power system as claimed in claim 5 wherein, The training of the fusion model based on the deep residual network and the Transformer comprises: The evaluation indexes are constructed by selecting the accuracy, precision, recall, and F1 value based on the confusion matrix to evaluate the performance of the fusion model.
9. A power system safety and stability rapid evaluation device, comprising: A sample set construction unit configured to pixelize measured or simulated power steady-state feature variables to generate offline three-channel pixelized images and construct a sample set; The electrical quantity types of the power steady-state feature variables include voltage, active power, and reactive power; A fusion model training unit configured to train a fusion model based on a deep residual network and a Transformer using the constructed sample set, and the trained fusion model is used for power system safety and stability rapid evaluation; A transient stability evaluation unit configured to pixelize real-time measured power steady-state feature variables to generate online three-channel pixelized images, and process the generated online three-channel pixelized images using the trained fusion model to generate a power system transient stability state evaluation conclusion.
10. A terminal comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Power system transient stability evaluation method and system based on imaging data driving
CN115311509A
Distribution network line mapping element and characteristic automatic identification matching system and method
CN117475462A
Method, device and terminal for rapidly evaluating safety and stability of power system
CN118410305A
Methods, systems, and computer readable mediums for determining a system state of a power system using a convolutional neural network
US20200184308A1
Cited By
Method and system for predicting intermediate point temperature of large coal-fired power generation unit
CN121958896A
Centralized control station network security situation awareness method and system
CN122001682A