Power system safety and stability rapid assessment method, device and terminal

Through the fusion model of the deep residual network and Transformer, the power steady-state characteristic variables are processed in pixels and a sample set is constructed, which solves the problem of insufficient timeliness and accuracy of the transient stability assessment of the power system and achieves fast and accurate power grid situation awareness. , which improves the level of intelligent power grid regulation.

CN118410305BActive Publication Date: 2024-09-27CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410873998.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-27
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

Existing power system transient stability assessment methods are not timely and accurate enough, making it difficult to quickly respond to complex changes in the power grid, resulting in increased risks to power system security and stability.

Method used

A fusion model based on deep residual network and Transformer is used to pixelate the power steady state characteristic variables into three-channel pixelated images, build a sample set and train the model to achieve rapid assessment of the transient stable state of the power system.

Benefits of technology

It improves the timeliness and accuracy of the transient stability assessment of the power system, enables grid situation awareness within milliseconds, meets the needs of online security assessment, reduces the work intensity of regulators, and improves the level of intelligent grid regulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118410305B
    Figure CN118410305B
Patent Text Reader

Abstract

The present application discloses a method, device and terminal for rapid assessment of power system safety and stability. The method includes: pixelating the measured or simulated power steady-state characteristic variables to generate an offline three-channel pixelated image, and constructing a sample set; using the constructed sample set to train a fusion model based on a deep residual network and Transformer, and the trained fusion model is used for rapid assessment of power system safety and stability; pixelating the real-time measured power steady-state characteristic variables to generate an online three-channel pixelated image; using the trained fusion model to process the generated online three-channel pixelated image to generate a transient stability state assessment conclusion of the power system. In this way, the fusion model combining ResNet and Transformer can meet the timeliness and accuracy requirements of online safety and stability assessment of power systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power grid operation and control technology, and specifically to a method, device and terminal for rapid safety and stability assessment of a power system. Background Art

[0002] 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-load uncertainty, grid vulnerability and openness, the continuous expansion of the grid scale, the more complex and changeable grid operation mode, the continuous change of the transient stability boundary of the power system, the increasingly complex transient stability mechanism of the power system, and the increasing risk of mismatch of grid security and stability.

[0003] The transient stability problem of power systems is a key factor that threatens the safe operation of large-scale power grids, and in severe cases can lead to the collapse of power systems. At present, among the methods for transient stability assessment, the time domain simulation method has strong adaptability but low timeliness; the direct method simplifies the physical model, resulting in conservative calculation results.

[0004] Therefore, there is an urgent need to study technical solutions that can quickly conduct transient stability assessments of power systems. Summary of the invention

[0005] In view of this, the present application proposes a method, device and terminal for rapid assessment of power system safety and stability, aiming to solve the problems of insufficient timeliness and accuracy of existing power system transient stability assessment methods.

[0006] In a first aspect, the present application provides a method for rapid assessment of power system safety and stability, comprising:

[0007] Pixelating the steady-state characteristic variable of electric power obtained by measurement or generated by simulation, generating an offline three-channel pixelated image, and constructing a sample set; the electrical quantity types of the steady-state characteristic variable of electric power include: voltage, active power, and reactive power;

[0008] Using the constructed sample set, a fusion model based on a deep residual network and a Transformer is trained, and the trained fusion model is used for rapid safety and stability assessment of a power system;

[0009] The real-time measured electric power steady-state characteristic variables are pixelated to generate an online three-channel pixelated image; the online three-channel pixelated image is processed by the trained fusion model to generate a transient stability state assessment conclusion of the electric power system.

[0010] Furthermore, pixelating the electric power steady-state characteristic variable obtained by measurement or generated by simulation includes:

[0011] According to the topological structure of the power grid, the power grid is pixelated by using the escape mechanism, and each element of the power grid is mapped into each plane figure in the basic image; the basic image includes a non-bus basic image and a bus basic image.

[0012] Furthermore, pixelating the measured or simulated electric power steady-state characteristic variables to generate an offline three-channel pixelated image includes:

[0013] Mapping the electric power steady-state characteristic variable to the non-bus basic image to generate an active power pixelated image and a reactive power pixelated image, and mapping the electric power steady-state characteristic variable to the bus basic image to generate a voltage pixelated image;

[0014] The active power pixelated image, the reactive power pixelated image and the voltage pixelated image are structured into the off-line three-channel pixelated image.

[0015] Furthermore, the constructing of the sample set includes:

[0016] Using the pre-built power grid time-domain simulation model, we set up faults that may cause system instability for a variety of typical power grid operation modes, simulate the power grid offline, and obtain the state quantity of the power grid when it is running stably before the fault is injected;

[0017] Selecting multiple electrical quantities used to characterize the transient stability of the system from the state quantities of the power grid during stable operation before the injection of faults obtained under various typical power grid operation modes as power steady-state characteristic variables;

[0018] Pixelating the selected power steady-state characteristic variables to generate multiple groups of off-line three-channel pixelated images;

[0019] Each group of three-channel pixelated images and their corresponding transient stable labels are combined into samples to form a sample set.

[0020] Furthermore, the constructed sample set is used to train a fusion model based on a deep residual network and a Transformer, including:

[0021] The three-channel pixelated image corresponding to each sample in the sample set is used as the input of the deep residual network, the matrix feature map generated by the deep residual network is used as the input of the Transformer based on the multi-head attention mechanism, and the transient stable label corresponding to each sample in the sample set is used as the output of the Transformer based on the multi-head attention mechanism.

[0022] Furthermore, the deep residual network includes n residual modules, where n is a natural number not less than 3;

[0023] The deep residual network processes three-channel pixelated images, including:

[0024] The acquired three-channel pixelated image is used as input for standard convolution processing to obtain a standard convolution result;

[0025] Performing maximum pooling on the standard convolution result to obtain a maximum pooling result;

[0026] On the residual path, the maximum pooling result is used as input and sequentially passes through N1 first residual modules connected in series to generate a first residual module group processing result;

[0027] The processing result of the i-th residual module group is taken as input, and sequentially passes through N (i+1) series-connected (i+1)-th residual modules to generate the processing result of the (i+1)-th residual module group, where i is greater than or equal to 1 and less than n;

[0028] The generated nth residual module group processing result is used as the matrix feature map output after being processed by the deep residual network.

[0029] Furthermore, the Transformer based on the multi-head attention mechanism includes multiple Transformer encoder modules, position encoding modules, and classification information modules;

[0030] The Transformer encoder module includes a multi-head attention layer, a feed-forward network layer, a residual connection unit, and a layer normalization unit.

[0031] Furthermore, the training is based on a fusion model of a deep residual network and a Transformer, including:

[0032] The accuracy, precision, recall and F1 value based on the confusion matrix are used to construct evaluation indicators to evaluate the performance of the fusion model.

[0033] In a second aspect, the present application provides a device for rapid assessment of power system safety and stability, comprising:

[0034] A sample set construction unit is used to pixelate the steady-state characteristic variable of electric power obtained by measurement or generated by simulation, generate an offline three-channel pixelated image, and construct a sample set; the electrical quantity types of the steady-state characteristic variable of electric power include: voltage, active power, and reactive power;

[0035] A fusion model training unit, used to train a fusion model based on a deep residual network and a Transformer using the constructed sample set, wherein the trained fusion model is used for rapid safety and stability assessment of a power system;

[0036] The transient stability assessment unit is used to pixelate the real-time measured power steady-state characteristic variables to generate an online three-channel pixelated image; and use the trained fusion model to process the generated online three-channel pixelated image to generate a transient stability state assessment conclusion of the power system.

[0037] 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, wherein the processor executes the computer program to implement the method described in the first aspect.

[0038] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0040] Figure 1 A schematic diagram of a flow chart of a method for rapid safety and stability assessment of a power system according to an embodiment of the present application;

[0041] Figure 2 A schematic diagram of a flow chart of a method for rapid safety and stability assessment of a power system according to another embodiment of the present application;

[0042] Figure 3A A schematic diagram of the power grid topology structure of the IEEE 39-node standard system in an embodiment of the present application;

[0043] Figure 3B for Figure 3A The visual display of the IEEE 39-node standard system after pixelation and superposition of three channels is shown;

[0044] Figure 3C for Figure 3A A visual representation of the voltage pixelated image of the IEEE 39-node standard system shown;

[0045] Figure 3D for Figure 3A A visual representation of the pixelated image of active power of the IEEE 39-node standard system shown;

[0046] Figure 3E for Figure 3A A visual representation of the pixelated image of reactive power of the IEEE 39-bus standard system shown;

[0047] Figure 4A It is a visual display diagram and a partial enlarged diagram of a voltage pixelation image in voltage pixelation in an embodiment of the present application;

[0048] Figure 4B It is a visual display diagram and a partial enlarged diagram of an active power pixelation image in the active power pixelation in the embodiment of the present application;

[0049] Figure 4C It is a visual display diagram and a partial magnified diagram of a reactive power pixelation image in the reactive power pixelation in an embodiment of the present application;

[0050] Figure 5 This is an overall structural diagram of a fusion model used for transient stability assessment in a method for rapid safety and stability assessment of a power system according to an embodiment of the present application;

[0051] Figure 6 A schematic diagram of the ResNet network structure of a fusion model for transient stability assessment in a method for rapid safety and stability assessment of a power system in an embodiment of the present application;

[0052] Figure 7 A Transformer schematic diagram of a fusion model for transient stability assessment in a method for rapid safety and stability assessment of a power system according to an embodiment of the present application;

[0053] Figure 8 A schematic diagram of the composition of a device for rapid safety and stability assessment of a power system according to an embodiment of the present application;

[0054] Fig. 9 A schematic diagram of the composition of a terminal to which the method for rapid assessment of power system safety and stability according to an embodiment of the present application is applied. DETAILED DESCRIPTION

[0055] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying 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. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to be able to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other.

[0056] The large-scale grid connection of new energy sources and the commissioning of a high proportion of power electronic equipment have led to a decrease in the inertia of the power system, an increase in the uncertainty of operating conditions, a decrease in predictability, and profound changes in the internal mechanism of transient stability.

[0057] Affected by manpower limitations and time costs, the traditional "offline simulation, manual decision-making" plan-based analysis cannot adapt to the complex and diverse power grid operating environment, and is increasingly unable to cope with the complex and diverse large power grids. Correspondingly, the traditional "plan-based" safety strategy is also difficult to adapt to the complex and changeable operation mode of the power system, and has defects such as low computational efficiency and poor timeliness when solving transient stability assessments.

[0058] At present, thanks to huge amounts of data, mature learning algorithms and powerful computing support, artificial intelligence technology has made technological breakthroughs in areas such as vision, language and transportation, effectively improving the level of intelligence in different industrial fields.

[0059] Referring to the above description, when completing the transient stability assessment task, the time domain simulation method has strong adaptability but low timeliness; the direct method simplifies the physical model, resulting in conservative calculation results. The traditional "contingency" safety strategy is difficult to adapt to the complex and changeable operation mode, and data-driven artificial intelligence technology is expected to provide new technical means for the safety and stability assessment of power systems.

[0060] The main features of future power grid development are digitalization, informatization and intelligence, and advanced artificial intelligence technology is urgently needed to enhance the timeliness of power system situation awareness tasks. Data-driven artificial intelligence technology has strong perception, prediction and decision-making capabilities. The effective combination of artificial intelligence technology and power grid control system can provide an effective means to improve the level of intelligent power grid control and reduce the workload of control personnel.

[0061] To this end, this application provides a technical solution for rapid safety and stability assessment of power systems. It is an engineering application of deep learning under power grid situation awareness technology, which is conducive to deepening and improving the transient stability assessment technology of power systems. It has broad application prospects and can bring huge economic and social benefits by upgrading the smart grid control systems of power management departments at all levels or within each administrative region.

[0062] At present, the wide-area measurement system (WAMS) based on the phasor measurement unit (PMU) is becoming more and more perfect. The high-speed real-time communication network has greatly improved the observability of the power system and provided sufficient data support for the digital construction of the power grid.

[0063] The technical solution for rapid safety and stability assessment of power systems provided in the present application 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, and a fusion model based on computer images is established to realize safety and stability assessment of power systems. In the online link, the grid operation parameters are acquired from the grid control system in real time, the acquired grid operation parameters are escaped, and multi-channel pixelated images such as voltage pixelated images, active power pixelated images, and reactive power pixelated images are generated; the multi-channel pixelated images are processed using a trained computer image-based fusion model to generate a conclusion on the safety and stability assessment of the power system, such as system stability or system instability. In this way, the application of artificial intelligence technology in transient stability assessment tasks has the advantages of being fast and accurate.

[0064] Specifically, the above-mentioned AI-based rapid safety and stability assessment method deeply mines the inherent mapping rules in the massive, multi-type and low-value density power grid operation data, characterizes the temporary stability boundary of the power system, and realizes the assessment of the temporary stability (transient stability) state of the power grid. This method is not limited by the accuracy of the physical model, and the perception of the power grid situation can be achieved within milliseconds. It can meet the balance between the timeliness and accuracy of online safety assessment, and can be effectively combined with the power grid control system, providing effective technical means to improve the level of intelligent perception of power grid situation and reduce the workload of control personnel.

[0065] Implementing the technical solution for rapid safety and stability assessment of the power system provided in this application in the power grid control system operated by power management departments at all levels can improve the level of intelligence of power grid situation awareness and reduce the workload of control personnel.

[0066] This method combines artificial intelligence technology with the needs of transient stability assessment, and solves the key problems faced in applying artificial intelligence technology in power grid situation 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 uncertainty, vulnerability and openness problems in the actual application scenarios of the power grid.

[0067] like Figure 1 As shown, the method for rapid assessment of power system safety and stability in an embodiment of the present application includes the following steps:

[0068] S100: pixelating the steady-state characteristic variable of electric power obtained by measurement or generated by simulation, generating an offline three-channel pixelated image, and constructing a sample set; the electrical quantity types of the steady-state characteristic variable of electric power include: voltage, active power, and reactive power;

[0069] S200: Using the constructed sample set, training a fusion model based on a deep residual network and a Transformer, and using the trained fusion model for rapid safety and stability assessment of a power system;

[0070] S300: pixelating the electric power steady-state characteristic variables measured in real time to generate an online three-channel pixelated image; and using the trained fusion model to process the generated online three-channel pixelated image to generate a transient stability state assessment conclusion of the electric power system.

[0071] In the above step S200, the deep residual network (Residual Network, ResNet) and the Transformer based on the multi-head attention mechanism are fused to obtain a fusion model for rapid assessment of power system security and stability (hereinafter referred to as an artificial intelligence-based fusion model). The fusion model can extract features from multi-channel pixelated images, establish an association mapping between multi-channel pixelated images and the transient stability state of the power grid, and then quickly evaluate the transient stability of the power system.

[0072] In some embodiments, the overall technical framework of the power system security and stability rapid assessment method is as follows: Figure 2 shown.

[0073] In some embodiments, in step S100 , the electric power steady-state characteristic variables obtained by measurement or generated by simulation are pixelated to generate an offline three-channel pixelated image, and a sample set is constructed, including the following steps S110A, S110B, S120 and S130 .

[0074] S110A: Determine the topological model and operation mode of the power grid, set typical faults, perform offline time domain simulation on the power grid, and analyze the transient stability of its power system.

[0075] The transient stability of the power system is related to many factors such as the operation mode of the power grid and the type of fault. Clarifying the operation mode of the power grid is the basis for the transient stability analysis of the power system. The actual operation range of the power grid is generally in the neighborhood of the typical power grid operation mode, and it is impossible to fully cover all the operation scenarios of the future power grid. On the other hand, in actual operation, the probability of system instability after the power grid suffers a fault is low, and the system instability samples obtained through wide-area measurement systems are very few, lacking samples, and insufficient sample size. To build a data-driven fusion model (the aforementioned artificial intelligence-based fusion model), it is necessary to build a sample set that balances the data volume of system stability samples and system instability samples in diversified power grid operation scenarios as the input of the model to train the model.

[0076] To this end, in addition to measuring and obtaining the steady-state characteristic variables of electric power, the pre-built power grid time-domain simulation model can also be used to set up faults that may cause system instability for any typical power grid operation mode (such as single-phase grounding fault, two-phase short circuit, three-phase short circuit, and usually the most destructive fault type or fault degree under the current typical operation mode can be set), and the power grid can be simulated offline to generate and obtain various state quantities of the stable operation of the power grid before the fault is injected, and judge 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 assessment conclusion of the power system. Furthermore, the unstable state or stable state of the power system after the fault is injected is used as the transient stability label of the sample.

[0077] In this way, in various typical power grid operation scenarios, faults are set up respectively, and offline time domain simulation is performed on the power grid to analyze the transient stability of the power system within the actual operation range of the power grid.

[0078] Typically, by adjusting the system parameters of the power grid time domain simulation model, a variety of typical power grid operation scenarios including any of the following can be achieved: the output of the generator in the system changes; the load level in the system changes.

[0079] S110B: Based on the process and conclusion of analyzing the transient stability of the power system under various typical power grid operation modes, multiple electrical quantities used to characterize the transient stability of the system are selected from the state quantities obtained by measurement or generated by simulation as power steady-state characteristic variables.

[0080] Table 1 Power steady-state characteristic variables

[0081] Feature variables meaning Bus voltage <![CDATA[ P L ]]> Line active power <![CDATA[ Q L ]]> Line reactive power <![CDATA[ P G ]]> Generator active power <![CDATA[ Q G ]]> Generator reactive power <![CDATA[P D ]]> Load active power <![CDATA[Q D ]]> Load reactive power

[0082] 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 component types for setting the power steady-state characteristic variables include: bus, line, generator and load; the power steady-state characteristic variables include: the voltage of each bus; the active power and reactive power of each line; the active power and reactive power of each generator; the active power and reactive power of each load.

[0083] According to the groups of steady-state characteristic variables obtained by analyzing the transient stability of the power system under various typical power grid operation modes, data preprocessing is performed for subsequent pixelation processing.

[0084] Specifically, data preprocessing includes converting to per-unit values ​​and supplementing missing data by interpolation. Data preprocessing is performed on each group of steady-state characteristic variables obtained under each typical power grid operation mode, and will not be described in detail.

[0085] Furthermore, after data preprocessing, each steady-state characteristic variable in a typical power grid operation mode and a transient stability label of system instability or system stability after fault injection are combined into a sample and added to the sample set.

[0086] Furthermore, when constructing the sample set, the ratio of the number of samples with the sample label "system stability" to the number of samples with the sample label "system instability" in the sample set is adjusted according to engineering experience, so that the amount of data corresponding to the system stable label is balanced with the amount of data corresponding to the system instability label, which is conducive to ensuring the accuracy and generalization ability of the data-driven fusion model.

[0087] In the above, for each state quantity under the typical operating scenario generated by simulation, the key state quantities that affect the transient stability of the power system are selected as the power steady-state characteristic variables and data preprocessing is performed to obtain various samples, and a sample set is constructed in which the data amount corresponding to the system stability label is balanced with the data amount corresponding to the system instability label.

[0088] A plane image refers to a plane graphic with M×N pixels at a specified resolution; it can be a grayscale image or a color image. In the case of a grayscale image, it is a single-channel image, and the pixel value of each pixel in the image ranges from 0 to 255. In the case of a color image, the image is a three-channel image. A 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 in the R channel, the G channel, and the B channel ranges from 0 to 255. When a color image of any color model is displayed on a display screen, it can have color in the sense of human vision.

[0089] like Figure 2 , Figure 5 As shown in the figure, the steady-state characteristic variables of electric power obtained under each typical power grid operation mode in the sample set are pixelated and used as the input of the fusion model.

[0090] In this way, the power steady-state characteristic variables related to the transient stability of the power system are selected, and after pixelation processing, they are input into the fusion model to train the fusion model.

[0091] It should be understood that the number of channels or dimensions or data volume of the input of the data-driven fusion model should remain consistent in the three stages of model training, model performance evaluation, and online transient stability evaluation (i.e., online application).

[0092] S120: According to the topological structure of the power grid, the power grid is pixelated by using an escape mechanism, and each element of the power grid is mapped into each plane figure in a basic image, wherein the basic image includes a non-bus basic image and a bus basic image.

[0093] Specifically, based on Figure 3AThe power grid topology diagram shown in FIG. 1 generates a non-busbar basic image corresponding to the power grid topology diagram (such as Figure 3D or Figure 3E ) and busbar basic images (such as Figure 3C ).

[0094] like Figure 3A As shown, the power grid topology structure diagram is a plane image with M×N pixels at a specified resolution. Specifically, the non-bus basic image and the bus basic image correspond to the power grid topology structure diagram, including: the resolution of the non-bus basic image and the bus basic image is proportional to the resolution of the power grid topology structure diagram, and the number of pixels of the non-bus basic image and the bus basic image in the width direction and the height direction are respectively proportional to the number of pixels of the power grid topology structure diagram in the width direction and the height direction. Naturally, the non-bus basic image and the bus basic image can be grayscale images or color images.

[0095] In some embodiments, according to the topology of the power grid, the power grid is pixelated using an escape mechanism, including:

[0096] based on Figure 3A The grid topology diagram shown in the figure is used to determine the positions of the busbar, line, generator and load in the grid topology diagram respectively;

[0097] According to the determined position of the generator in the power grid topology diagram, in the non-busbar basic image, each generator is mapped into a first graphic, such as a rectangle with m1 pixels, and the pixel value of each pixel in the rectangle is a preset first value or a random value, specifically, it can be zero;

[0098] According to the determined position of the load in the power grid topology diagram, in the non-busbar basic image, each load is mapped into a second graphic, such as a rectangle with m2 pixels, and the pixel value of each pixel in the rectangle is a preset second value or a random value, specifically, it can be zero;

[0099] According to the position of the determined line in the power grid topology diagram, in the non-busbar basic image, each line is mapped into a third graphic, such as a polygon with m3 pixels, and the pixel value of each pixel in the polygon is a preset third value or a random value, specifically, it can be zero;

[0100] According to the determined position of the bus in the power grid topology diagram, in the bus base image, each bus is mapped into a fourth graphic, such as a rectangle with m4 pixels, and the pixel value of each pixel in the rectangle is a predetermined fourth numerical value or a random value, specifically, it can take zero value.

[0101] It should be understood that in the escape mechanism, the values ​​of variables m1, m2, m3, and m4 representing the shapes or sizes of the plane graphics of different elements can be adaptively adjusted according to the size of the pixelated image and customization requirements to have a better visual display effect.

[0102] Preferably, the aforementioned pre-set first value, second value, third value, and fourth value are different from each other. In this way, in the non-bus basic image, the generator, load, and line have different pixel values, respectively, which has better visual distinction and visual display effect.

[0103] Furthermore, the non-bus basic image is superimposed with the bus basic image to obtain the overall basic image. In the overall basic image, the bus generator, load and line have different pixel values, which has good visual distinction and visual display effect. In addition, comparing the power grid topology diagram with the overall basic image is conducive to verifying the accuracy of the escape mechanism.

[0104] Preferably, the value of m2 of the second graphic is selected to be equal to the value of m1 of the first graphic, so as to simplify the operation and improve the processing speed without affecting the display effect and visual effect.

[0105] In some embodiments, the positions of the busbar, line, generator and load in the power grid topology diagram can be expressed by coordinates, such as taking the upper left corner of the power grid topology diagram as the coordinate origin, the left and right directions as the width direction, and the up and down directions as the height direction, and using height coordinates and width coordinates to express the absolute positions of the busbar, line, generator and load in the power grid topology diagram. Alternatively, taking a certain element of the power grid topology diagram as a reference datum, the relative positions of the busbar, line, generator and load in the power grid topology diagram are expressed according to the relative positions of other elements and the reference datum.

[0106] In some embodiments, the position of each element in the power grid topology and the connection relationship between each element are extracted; or a power grid topology diagram is obtained, and the position of each element in the power grid topology diagram and the relative position between each element are extracted; referring to the above description, the element type is any one of the following: bus, line, generator, load; a power grid escape coordinate system is established, the escape coordinates of each element are generated, and each element is distributed in a plane figure.

[0107] Specifically, a plane graphic of a preset size (the background is a preset pixel value, such as Figure 3C , Figure 3D or Figure 3E The blue color in the RGB color model in the figure shows the coverage of the power grid and the components in the power grid, where each component or node is displayed in a preset plane shape (such as a polygon such as a rectangle, rhombus, trapezoid or parallelogram).

[0108] and Figure 3A Correspondingly, Figure 3C The plane graphics corresponding to the M1 buses are shown in the figure. The pixel value of each plane graphic corresponds to the voltage value of the bus. Each bus is displayed as a horizontal line segment with a line width of A. The length of the line segment corresponds to the length of the bus in the IEEE39 node standard diagram.

[0109] and Figure 3A Correspondingly, Figure 3D , the plane graphics corresponding to the M2 lines are shown respectively, the pixel value of each plane graphic corresponds to the active power value 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; Figure 3A Correspondingly, Figure 3E The plane graphics corresponding to the M2 lines are shown in FIG. 1 , and the pixel value of each plane graphic corresponds to the reactive power value on the line.

[0110] and Figure 3A Correspondingly, Figure 3D The plane graphics corresponding to M3 generators are shown in the figure. The pixel value of each plane graphic corresponds to the active power value (generated) of the generator. The generator is displayed as a square with a side length of C1. The coverage of the plane graphics corresponding to the generator is determined according to the rated power of the generator or the side length C1; Figure 3E , the plane graphics corresponding to the M3 generators are shown respectively, and the pixel value of each plane graphic corresponds to the reactive power value (generated) of the generator.

[0111] With Figure 3A Correspondingly, such as Figure 3D The plane graphics corresponding to M4 loads are shown in FIG. 1 . The pixel value of each plane graphic corresponds to the active power value of the load (consumption). The load is displayed as a square with a side length of C2. The coverage of the plane graphic corresponding to the load is determined according to the rated power of the load or the side length C2. Figure 3E The plane graphs corresponding to M4 loads are shown in FIG. 1 , and the pixel value of each plane graph corresponds to the reactive power value of the load (consumption).

[0112] like Figure 3D and Figure 3E As shown, each generator and each load is respectively connected to one end of a line.

[0113] S130: Mapping the electric 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 electric power steady-state characteristic variables to the bus basic image to generate a voltage pixelated image.

[0114] Specifically, mapping the electric power steady-state characteristic variable to the non-bus base image to generate an active power pixelated image includes:

[0115] The active power values ​​of each line, each generator, and each load in the acquired electric power steady-state characteristic variables are respectively mapped into pixel values ​​of the plane graph corresponding to each element;

[0116] In the non-bus basic image, the pixel value of each pixel point in the plane graph corresponding to each line, each generator, and each load is updated respectively to obtain an active power pixelated image.

[0117] Thus, in the active power pixelated image, the pixel value of each pixel point of each graph corresponding to the generator or load corresponds to the active power value of each line, the active power value of each generator, and the active power value of each load in the power steady-state characteristic variable.

[0118] Specifically, mapping the electric power steady-state characteristic variable to the non-bus base image to generate a reactive power pixelated image includes:

[0119] The reactive power values ​​of each line, each generator, and each load in the acquired electric power steady-state characteristic variables are respectively mapped into pixel values ​​of the plane graph corresponding to each element;

[0120] In the non-busbar basic image, the pixel value of each pixel point in the plane graph corresponding to each line, each generator, and each load is updated respectively to obtain a reactive power pixelated image.

[0121] Thus, in the reactive power pixelated image, the pixel value of each pixel point of each graph corresponding to the generator or load corresponds to the reactive power value of each line, the reactive power value of each generator, and the reactive power value of each load in the power steady-state characteristic variable.

[0122] Specifically, mapping the electric power steady-state characteristic variable to the bus base image to generate a voltage pixelated image includes:

[0123] Mapping the voltage value of each bus in the acquired power steady-state characteristic variable to the pixel value of the plane graph corresponding to each bus;

[0124] In the busbar basic image, the pixel value of each pixel point in the plane graph corresponding to each busbar is updated respectively to obtain a voltage pixelated image.

[0125] In this way, in the voltage pixelated image, the pixel value of each pixel point of each graph corresponding to each bus corresponds to the voltage value of each bus in the power steady-state characteristic variable.

[0126] Furthermore, the pixel value of each pixel in the voltage pixelized image is converted into the corresponding visual color using the color scheme in the preset RGB color model, and the following is obtained: Figure 3CVisual representation shown.

[0127] Furthermore, the pixel value of each pixel in the active power pixelized image is converted into the corresponding visual color using the color scheme in the preset RGB color model, and the following is obtained: Figure 3D Visual representation shown.

[0128] Furthermore, the pixel value of each pixel in the reactive power pixelized image is converted into the corresponding visual color using the color scheme in the preset RGB color model, and the following is obtained: Figure 3E Visual representation shown.

[0129] In the above, according to the topological structure and escape mechanism of the power grid, each component of the power grid is mapped to each plane figure in the basic image, and each electrical quantity in the power steady-state characteristic variable is mapped to the pixel value of the corresponding plane figure according to the component type, and the reactive power pixelated image, active power pixelated image, and voltage pixelated image are updated. In this way, each steady-state characteristic variable is pixelated into three different channels of computer images: reactive power pixelated image, active power pixelated image, and voltage pixelated image.

[0130] Referring to the above description, the artificial intelligence-based fusion model can process computer images quickly and efficiently and extract the features of computer images. Therefore, pixelating the power steady-state characteristic variables is beneficial to the performance of the fusion model.

[0131] In some embodiments, pixelation of the steady-state characteristic variable includes: mapping the voltage value in the steady-state characteristic variable corresponding to each element to a pixel value corresponding to the planar image, and updating the voltage pixelated image according to each of the pixel values;

[0132] Mapping the active power value in the steady-state characteristic variable corresponding to each element into a pixel value corresponding to the plane image, and updating the active power pixelated image according to each of the pixel values;

[0133] The reactive power values ​​in the steady-state characteristic variables corresponding to each element are mapped into pixel values ​​corresponding to the plane image, and the reactive power pixelated image is updated according to each of the pixel values.

[0134] In this way, the voltage pixelated image records the plane graphics corresponding to M1 busbars, each of which has a center coordinate and a coverage area, and the pixel value of the plane graphics corresponding to each busbar is obtained by mapping the voltage value of each busbar.

[0135] In this way, the active power pixelated image records the plane figures corresponding to the M2 lines, the plane figures corresponding to each line have a center coordinate and a coverage area, and the pixel values ​​of the plane figures corresponding to each line are obtained by mapping the active power values ​​of each line; the active power pixelated image records the plane figures corresponding to the M3 generators, the plane figures corresponding to each generator have a center coordinate and a coverage area, and the pixel values ​​of the plane figures corresponding to each generator are obtained by mapping the active power values ​​of each generator; the active power pixelated image records the plane figures corresponding to the M4 loads, the plane figures corresponding to each load have a center coordinate and a coverage area, and the pixel values ​​of the plane figures corresponding to each load are obtained by mapping the active power values ​​of each load.

[0136] In this way, the reactive power pixelated image records the plane figures corresponding to the M2 lines, the plane figures corresponding to each line have a center coordinate and a coverage area, and the pixel values ​​of the plane figures corresponding to each line are obtained by mapping the reactive power values ​​of each line; the reactive power pixelated image records the plane figures corresponding to the M3 generators, the plane figures corresponding to each generator have a center coordinate and a coverage area, and the pixel values ​​of the plane figures corresponding to each generator are obtained by mapping the reactive power values ​​of each generator; the reactive power pixelated image records the plane figures corresponding to the M4 loads, the plane figures corresponding to each load have a center coordinate and a coverage area, and the pixel values ​​of the plane figures corresponding to each load are obtained by mapping the reactive power values ​​of each load.

[0137] by Figure 3A Taking the IEEE 39-node standard system shown in FIG. 1 as an example, the visual image of the IEEE 39-node standard system after pixel processing is as follows: Figure 3C , Figure 3D and Figure 3E shown. Figure 3C In the voltage pixelated image shown in , 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 carried by each bus. Figure 3D In the active power pixelated image shown in , multiple lines, generators and load nodes are displayed, and the pixel value of each pixel point in each node corresponds to the active power value carried by each line, generator or load bus. Figure 3E In the reactive power pixelated image shown in , multiple lines, generators and load nodes are displayed, and the pixel value of each pixel point in each node corresponds to the reactive power value carried by each line, generator or load bus.

[0138] by Figure 4A , Figure 4B , Figure 4CTaking the voltage pixelated image, active power pixelated image and reactive power pixelated image as examples, the escape mechanism and pixelation processing are further specifically described.

[0139] Figure 4A The portion of the white dashed rectangle in the middle right region of the voltage pixelated image on the left (with 4 pixel values) is enlarged and displayed as a 17×17 matrix on the right. The matrix corresponds to 17×17 pixels, and the pixel value of each pixel corresponds to the voltage value carried by the bus node or bus element. Among them, the pixel value 0 corresponds to the background color; the pixel values ​​0.8, 0.6 and 0.7 correspond to the other 3 colors respectively.

[0140] Figure 4B The part of the white dotted rectangle in the upper right area of ​​the voltage pixelated image on the left (with 5 pixel values) is enlarged and displayed as a 17×17 matrix on the right. The matrix corresponds to 17×17 pixels, and the pixel value of each pixel corresponds to the active power value carried 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 4 colors respectively.

[0141] Figure 4C The part of the white dotted rectangle in the upper right area of ​​the voltage pixelated image on the left (with 5 pixel values) is enlarged and displayed as a 17×17 matrix on the right. The matrix corresponds to 17×17 pixels, and the pixel value of each pixel corresponds to the reactive power value carried 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 4 colors respectively.

[0142] After the pixelation processing, each group of three pixelated images, including the active power pixelated image, the reactive power pixelated image and the voltage pixelated image, contains the size information of the steady-state characteristic variables and the grid topology information, and can reflect the spatial distribution of the system voltage, active power and reactive power.

[0143] In this way, through the escape mechanism, each component is arranged in the busbar basic image and the non-busbar basic image according to the 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 shape and pixel value of each component in each pixel image in three pixel images in one group. Naturally, when the size of the power grid steady-state characteristic variable changes, the corresponding pixelated image will also change accordingly.

[0144] When storing the above active power pixelated image, reactive power pixelated image and voltage pixelated image in structured data, each group of three pixelated 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 of (h, w, c, v). Among them, w represents the horizontal coordinate of the pixel point (such as the width direction mentioned above), h represents the vertical coordinate of the pixel point (such as the height direction mentioned above), c represents the channel where the pixel point is located (such as c is 0, 1 or 2, such as the voltage pixelated image corresponds to 0, the active power pixelated image corresponds to 1, and the reactive power pixelated image corresponds to 2); v represents the pixel value of the pixel point.

[0145] In this way, the above steps are repeated to pixelate the steady-state characteristic variables obtained under each typical power grid operation mode in the sample set, and three pixelated images in one group are generated, namely, active power pixelated image, reactive power pixelated image and voltage pixelated image. Each group of three pixelated images is used as a three-channel pixelated image, and a high-dimensional array is used for data structuring. The obtained high-dimensional array can be used for subsequent construction of fusion models, training of fusion models and prediction of power system stability using the trained fusion model.

[0146] As mentioned above, pixel processing of the grid topology and power steady-state characteristic variables to generate the input of the fusion model is one of the foundations of the entire overall technical framework. The purpose of pixel processing is to convert the grid topology or power steady-state characteristic variables into image data. This is because image data is conducive to the excellent image processing performance of the fusion model and its learning algorithm.

[0147] In the following steps, the high-dimensional array or three-channel pixelated image corresponding to each sample in the sample set is used as the input of the fusion model, and the transient stability label corresponding to each sample in the sample set is used as the output of the fusion model, and the fusion model is trained by supervised learning.

[0148] Rectified Linear Unit, or ReLU for short, is a commonly used activation function in neural networks. In general, it refers to the ramp function in mathematics.

[0149] In some embodiments, step S200 uses the constructed sample set to train a fusion model based on a deep residual network and a Transformer, including the following steps S210 and S220.

[0150] Specifically, in step S210, ResNet and Transformer are fused to obtain a framework of the fusion model, including:

[0151] Divide the sample set into a training set and a test set, such as the training set accounts for 80% of the samples in the sample set, and the test set accounts for 20% of the samples in the sample set;

[0152] The high-dimensional array or three-channel pixelated image corresponding to each sample in the sample set is used as the input of the deep residual network, the matrix feature map generated by the deep residual network is used as the input of the Transformer based on the multi-head attention mechanism, and the transient stable label corresponding to each sample in the sample set is used as the output of the Transformer, that is, the output of the fusion model.

[0153] Specifically, in step S220, the sample set constructed in the above steps is used to train the fusion model, and an associated mapping between the multi-channel pixelated image and the transient stability state of the power grid is established. The mapping relationship between the steady-state characteristic variables of the power grid and the transient stability of the power grid is established by the constructed fusion model.

[0154] like Figure 5 and Figure 6 As shown, after the input data (such as the aforementioned three-channel pixelated image or high-dimensional array) is processed by ResNet, a process matrix feature map is output. Compared with the input three-channel pixelated image or high-dimensional array, the process matrix feature map has a lower image resolution and the number of convolution kernel channels is increased in dimensionality.

[0155] Taking a three-channel pixelated image with 128×128×3 pixels as an example, after being processed by ResNet50, the generated matrix feature map or the output process matrix feature map is 8×8×1024.

[0156] like Figure 5 and Figure 7 As shown, the process matrix feature map output by 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.

[0157] like Figure 6 As shown in , in ResNet, the identity mapping structure in each residual module includes the identity mapping of cross-layer short connections, such as Figure 6 The solid or dotted boxes in the figure show the identity mapping path of the matrix feature map generated by the cross-layer short connection from the input matrix feature map to the residual path. The identity mapping structure of the cross-layer short connection outputs the input matrix feature map identically, adds it to the matrix feature map from the residual path, and generates the matrix feature map processed by the residual module after processing using the ReLU activation function.

[0158] In this way, the deep residual network ResNet50 can convert the complex function fitting problem into the problem of solving the residual function by adding the identity mapping of short connections across layers, so that the gradient always exists during the back-propagation operation, which can effectively avoid the training difficulties or gradient disappearance problems caused by too deep network layers.

[0159] like Figure 6 As shown in the upper part, from left to right, the three dotted boxes respectively show the first residual module, the second residual module of the downsampling type (such as convolution with a stride of 2), and the third residual module of the downsampling type (such as convolution with a stride of 2). In the downsampling residual module, the identity mapping path is implemented through a convolution layer, and the input matrix feature map is output through the identity mapping path with a convolution layer, and added to the matrix feature map output by the residual path, so that the number of pixels in the matrix feature map is halved, and downsampling is achieved.

[0160] Specifically, the identity mapping path with convolutional layers and residual connections are calculated by the following formula:

[0161]

[0162] Where: x is the input parameter or the matrix feature map of the input, and y is the parameter or matrix feature map of the residual structure output; W , W 1 and W 2 are the network parameters whose values ​​need to be determined through learning when training a neural network in a supervised manner.

[0163] Referring to the above description, the three-channel pixelated images are respectively a voltage pixelated image, an active power pixelated image and a reactive power pixelated image. Figure 3C , Figure 3D and Figure 3E Each pixelated image shown has 128×128 pixels as an example for explanation. Figure 3A The grid topology diagram shown shows 10 generators, 46 lines and 39 busbars.

[0164] like Figure 6 As shown, a matrix feature map with a three-channel pixelated image as data or input is processed by a deep residual network, including:

[0165] Perform standard convolution (Stdconv, 7×7, 64) on the input matrix feature map, with a convolution kernel size of 7×7, adjusting the output channel to 64 and a stride of 2 to obtain the standard convolution result;

[0166] Perform maximum pooling (maxpool 3×3) on the standard convolution result with a stride of 2 to obtain the maximum pooling result;

[0167] On the residual path, the maximum pooling result is used as input and sequentially passes through N1 first residual modules connected in series to generate a first residual module group processing result;

[0168] On the residual path, the processing result of the first residual module group is used as input, and sequentially passes through N2 second residual modules connected in series to generate a processing result of the second residual module group;

[0169] On the residual path, the processing result of the second residual module group is taken as input and sequentially passes through N3 third residual modules connected in series to generate the processing result of the third residual module group as the matrix feature map output after being processed by the deep residual network.

[0170] Specifically, Figure 6 As shown, the input matrix feature map passes through the first residual module, including:

[0171] Perform the first layer of convolution on the input matrix feature map with stride 1 (such as Conv2d,1×1,64), the convolution kernel size is 1×1, the number of channels is 64, and the first layer of convolution results are generated;

[0172] Use the ReLU activation function to process the first layer of convolution results to get the first activation result;

[0173] Perform a second layer of convolution on the first activation result with a stride of 1 (e.g. Conv2d,3×3,64), a convolution kernel size of 3×3, and 64 channels to generate the second layer of convolution results;

[0174] Use the ReLU activation function to process the second layer of convolution results to obtain the second activation result;

[0175] Perform the third convolution on the second activation result with a stride of 1 (e.g. Conv2d, 1×1, 256), a convolution kernel size of 1×1, and a channel number of 256 to generate the third convolution result;

[0176] Perform an identity mapping convolution (such as Conv2d,1×1,256) on the input matrix feature map with a stride of 1, a convolution kernel size of 1×1, and a channel number of 256 to generate an identity mapping convolution result;

[0177] After merging the third layer convolution result with the identity map convolution result, the ReLU activation function is used to generate the first residual module group processing result as the 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 number of convolution kernel channels is increased in dimension.

[0178] In the first residual module above, the 1×1 convolution kernel is used to conveniently adjust the number of channels in the middle layer. Before entering the 3×3 convolution layer, the number of channels is reduced (256->64), and after passing through the 3×3 convolution layer, the number of channels is restored (64->256), which can significantly reduce the number of network parameters.

[0179] Specifically, Figure 6 As shown, the input matrix feature map passes through the second residual module, including:

[0180] Perform the first layer of convolution on the input matrix feature map with stride 1 (such as Conv2d,1×1,128), the convolution kernel size is 1×1, the number of channels is 128, and the first layer of convolution results are generated;

[0181] Use the ReLU activation function to process the first layer of convolution results to get the first activation result;

[0182] Perform a second layer of convolution on the first activation result with a stride of 2 (e.g. Conv2d,3×3,128), a convolution kernel size of 3×3, and 128 channels to generate the second layer of convolution results;

[0183] Use the ReLU activation function to process the second layer of convolution results to obtain the second activation result;

[0184] Perform the third convolution on the second activation result with a stride of 1 (e.g. Conv2d,1×1,512), a convolution kernel size of 1×1, and a channel number of 512 to generate the third convolution result;

[0185] Perform an identity mapping convolution on the input matrix feature map with a stride of 2 (such as Conv2d,1×1,512), a convolution kernel size of 1×1, and a number of channels of 512 to generate an identity mapping convolution result;

[0186] After the third layer convolution result is combined with the identity map convolution result, the ReLU activation function is used to generate the second residual module group processing result as the matrix feature map corresponding to the input matrix feature map. In this way, the data is reduced in dimension after the second residual module processing.

[0187] In the second residual module above, the 1×1 convolution kernel is used to conveniently adjust the number of channels in the middle layer. Before entering the 3×3 convolution layer, the number of channels is reduced (512->128), and after passing through the 3×3 convolution layer, the number of channels is restored (128->512), which can significantly reduce the number of network parameters.

[0188] Specifically, Figure 6 As shown, the third residual module includes:

[0189] Perform the first layer of convolution on the input matrix feature map with stride 1 (such as Conv2d,1×1,256), the convolution kernel size is 1×1, the number of channels is 256, and the first layer of convolution results are generated;

[0190] Use the ReLU activation function to process the first layer of convolution results to get the first activation result;

[0191] Perform a second layer of convolution on the first activation result with a stride of 2 (e.g. Conv2d,3×3,256), a convolution kernel size of 3×3, and a channel number of 256 to generate the second layer of convolution result;

[0192] Use the ReLU activation function to process the second layer of convolution results to obtain the second activation result;

[0193] Perform the third convolution on the second activation result with a stride of 1 (e.g. Conv2d,1×1,1024), a convolution kernel size of 1×1, and 1024 channels to generate the third convolution result;

[0194] On the identity mapping path, the input matrix feature map is convolved with an identity mapping (such as Conv2d, 1×1, 1024) with a stride of 2, a convolution kernel size of 1×1, and a channel number of 1024 to generate an identity mapping convolution result;

[0195] After merging the third layer convolution result with the identity map convolution result, the ReLU activation function is used to generate the third residual module group processing result 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 number of convolution kernel channels is increased in dimension.

[0196] In the third residual module above, the 1×1 convolution kernel is used to conveniently adjust the number of channels in the middle layer. Before entering the 3×3 convolution layer, the number of channels is reduced (1024->256), and after passing through the 3×3 convolution layer, the number of channels is restored (256->1024), which can significantly reduce the number of network parameters.

[0197] refer to Figure 6 As shown in the figure, the number of channels of each convolutional layer in the second residual module is twice the number of channels of each convolutional layer in the first residual module; the number of channels of each convolutional layer in the third residual module is twice the number of channels of each convolutional layer in the second residual module, which is conducive to enhancing the feature extraction capability, extracting more advanced features related to the category, and increasing the complexity and expression ability of the model.

[0198] Naturally, the deep residual network ResNet can include more than 3 residual modules. The residual paths and identity mapping paths of other residual modules can be referred to Figure 6 The implementation of the first residual module, the second residual module or the third residual module shown will not be repeated here.

[0199] Furthermore, on the residual path, the maximum pooling result is used as input and sequentially passes through N1 first residual modules connected in series to generate a first residual module group processing result, including:

[0200] On the residual path, the maximum pooling result or the previous first residual module group processing result is taken as input, passes through N1 series-connected first residual modules in sequence, and the N1th series-connected first residual module processing result is taken as the first residual module group processing result.

[0201] like Figure 6 As shown, the maximum pooling result is taken as input and passes through (1+2) first residual modules in sequence to generate the first residual module group processing result, which will not be repeated here.

[0202] Furthermore, on the residual path, the processing result of the first residual module or the processing result of the previous series-connected second residual module is used as input, passes through N2 series-connected second residual modules in sequence, and the processing result of the N2th series-connected second residual module is used as the processing result of the second residual module group.

[0203] like Figure 6 As shown, the processing result of the first residual module group is taken as input and sequentially passes through (1+3) series-connected second residual modules to generate the processing result of the second residual module group, which will not be described in detail.

[0204] Furthermore, on the residual path, the processing result of the second residual module group is taken as input and sequentially passes through N3 third residual modules to generate a processing result of the third residual module group, including:

[0205] On the residual path, the processing result of the second residual module group or the previous third residual module processing result is taken as input, passes through N3 third residual modules in sequence, and the processing result of the N3th third residual module is taken as the processing result of the third residual module group.

[0206] like Figure 6 As shown, the processing result of the second residual module group is taken as input and sequentially passes through (1+8) third residual modules to generate the processing result of the third residual module group, which will not be repeated here.

[0207] In this way, ResNet performs feature selection on the input pixelated image, and can select feature variables with a high degree of correlation with the transient stability of the power grid to form the optimal feature set, and output it in the form of a multi-dimensional feature map (such as 8×8×1024).

[0208] Classification problems for power grid transient stability assessment, such as Figure 7 As shown in the figure, Transformer includes multiple Transformer encoder modules, position encoding modules (Position Embedding), and classification information modules. Among them, 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 1×192 classification relationship in the feature vector. Specifically, the classification information is a learnable parameter used to store data information related to classification.

[0209] Among them, Figure 5 and Figure 7 As shown in the figure, the Transformer encoder module includes a multi-head attention layer, a feedforward network layer, a residual connection unit, and a layer normalization unit, with the core being a multi-head attention mechanism. The multi-head attention mechanism uses adaptive attention weight distribution to divide the model into multiple subspaces, and then pays attention to different aspects of transient stability feature information (or transient stability information) of the power system. Finally, the transient stability information of various aspects is integrated to give it a global receptive field, which can realize the effective calculation of attention between various transient stability features, assign high weights to high-value transient stability information, and realize efficient allocation of information processing resources.

[0210] The adaptive attention weight distribution Attention(Q,K,V) reflects the matrix feature map of the Transformer encoder output data and input (such as Figure 5 or Figure 7 In the example, after being processed by ResNet50, the matrix feature map has 8×8×1024 dimensions) and the correlation between features and the value of features are calculated as follows:

[0211]

[0212] Among them, the query matrix Q , key matrix K , value matrix V The eigenvector matrix X Transformation generation, W Q , W K and W V They are all linear transformation matrices; d is the scaling factor, is the length of the row vector in the key matrix K;

[0213] W Q i , WK i and W V i They are Q , K , V Each matrix is ​​projected onto i The transformation matrix of the subspace is i =1,2... h , h is the total number of subspaces (the total number of subspaces is a preset model parameter);

[0214] H i For the i The single-head attention value of the subspace; MultiHead (Q, K, V) integrates the temporary information of various aspects. W O is the transformation matrix used to connect the attention values ​​of all subspaces.

[0215] In the layer normalization unit, each layer of neurons shares the mean and variance, so that the layer input is normalized to a standard normal distribution, which is beneficial to enhance the fluidity of back-propagation information.

[0216] like Figure 5 and Figure 7 As shown in the figure, each computer image will be processed by residual connection unit and layer normalization (Layer Norm) unit after passing through the multi-head attention layer and the feed-forward network layer.

[0217] like Figure 5 and Figure 7 As shown in Figure 1, the residual connection unit is an identity mapping type, which can make gradient transfer more efficient and avoid model degradation.

[0218] Specifically, the training is based on the fusion model of ResNet and Transformer, 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 the cross entropy loss function for classification, and the optimization method adopts the gradient descent method. As the model is trained multiple times, the optimization method will globally minimize the loss function until the model converges.

[0220] When training the fusion model based on ResNet and Transformer, the evaluation indicators are used to test and evaluate the effect of the fusion model for transient stability assessment of the power system, which is used to guide the online application of the model or the optimization and update of the model.

[0221] In order to evaluate the performance and effectiveness of the fusion model, the accuracy, precision, recall and F1 value based on the confusion matrix are used to construct evaluation indicators.

[0222] Accuracy refers to the number of correctly predicted unstable samples and stable samples and their ratio to the total number of samples in the training set or test set, which is used to indicate the overall accuracy. Precision refers to the ratio of correctly predicted unstable samples to the total number of predicted unstable samples. Recall refers to the ratio of the number of correctly predicted unstable samples (predicting unstable samples as unstable conclusions) to the total number of unstable samples. F1 value refers to the harmonic mean of precision and recall for unstable samples, which is used to focus on unstable sample scenarios.

[0223] The calculation formulas of the evaluation indicators are as follows:

[0224]

[0225] Where: TP Indicates a correctly judged stable sample (predicting a stable sample as a stable system); TN Indicates the correctly judged unstable samples (the unstable samples are predicted as system instability); FP Indicates unstable samples with wrong predictions or misjudgments; FN Represents a stable sample of prediction errors or misclassifications.

[0226] Specifically, the fusion model based on ResNet and Transformer is evaluated, including:

[0227] Based on the established evaluation indicators, the fusion model completed by offline training is tested on the test set; when the evaluation indicator value of the model in the test set (generated using the aforementioned evaluation indicators) meets the pre-set threshold, the trained fusion model is put into practical online application.

[0228] In some embodiments, in step S300, the real-time measured electric power steady-state characteristic variables are pixelated to generate an online three-channel pixelated image; the online three-channel pixelated image generated by processing the trained fusion model is used to generate a transient stability state assessment conclusion of the power system.

[0229] Specifically, during the online application of the fusion model, the power steady-state characteristic variables obtained from the wide-area measurement system are converted into pixelated images and input into the trained fusion model to perform power system transient stability assessment and generate power system transient stability assessment conclusions.

[0230] Preferably, the power system transient stability assessment conclusion generated by the fusion model is sent to the power grid control system.

[0231] In summary, the present invention combines artificial intelligence technology with the needs of transient stability assessment of power systems, proposes a method for transient stability assessment of power systems based on pixelation of power steady-state characteristic variables and fusion models, clarifies the translation mechanism of power steady-state characteristic variables to computer images, establishes a fusion model, and proposes an overall technical framework of data-translation-image-model.

[0232] This power system transient stability assessment method provides practical guidance and help for how to integrate artificial intelligence technology with power system situation awareness technology. The proposed power steady-state characteristic variable pixelization method is conducive to giving full play to the processing advantages of artificial intelligence technology for image data; combined with the powerful data mining capabilities of the fusion model of ResNet and Transformer, it meets the timeliness and accuracy requirements of online security assessment, gives full play to the role of machine intelligence, and provides an effective means to improve the level of intelligent power grid control and reduce the workload of control personnel, with high engineering applicability.

[0233] like Figure 8 As shown, the power system safety and stability rapid assessment device of the embodiment of the present application includes:

[0234] The sample set building unit 10 is used to pixelate the electric power steady-state characteristic variables obtained by measurement or generated by simulation, generate an offline three-channel pixelated image, and build a sample set; the electrical quantity types of the electric power steady-state characteristic variables include: voltage, active power, and reactive power;

[0235] A fusion model training unit 20 is used 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 rapid safety and stability assessment of a power system;

[0236] The transient stability assessment unit 30 is used to pixelate the real-time measured power steady-state characteristic variables to generate an online three-channel pixelated image; and generate a transient stability state assessment conclusion of the power system by processing the generated online three-channel pixelated image using the trained fusion model.

[0237] The power system safety and stability rapid assessment device of the embodiment of the present application and the power system safety and stability rapid assessment method of the embodiment of the present application are based on the same inventive concept, can be implemented as a reference, and have the same beneficial effects as the methods adopted, operated or implemented.

[0238] The present application also provides a terminal to execute the method. Fig. 9 It shows a schematic diagram of a terminal provided by some embodiments of the present application. Fig. 9As shown, the terminal 8 includes: a processor 800, a memory 801, a bus 802 and a communication interface 803, and the processor 800, the communication interface 803 and the memory 801 are connected via the bus 802; the memory 801 stores a computer program that can be run on the processor 800, and the processor 800 executes the method provided by any embodiment described in the present application when running the computer program.

[0239] The memory 801 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the device network element and at least one other network element is realized through at least one communication interface 803 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0240] The bus 802 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 801 is used to store programs, and the processor 800 executes the program after receiving an execution instruction. The method disclosed in any implementation of the embodiment of the present application may be applied to the processor 800, or implemented by the processor 800.

[0241] The processor 800 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the method can be completed by an integrated logic circuit of hardware in the processor 800 or an instruction in the form of software. The processor 800 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 801, and the processor 800 reads the information in the memory 801 and completes the steps of the method in combination with its hardware.

[0242] The terminal provided in the embodiment of the present application and the method in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, operated or implemented by them.

[0243] An embodiment of the present application also provides a computer-readable storage medium corresponding to the method provided by the embodiment, and the computer-readable storage medium is a CD, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it will execute the method provided by any of the embodiments.

[0244] It should be noted that examples of the computer-readable storage medium may 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 or magnetic storage media, which are not listed here one by one.

[0245] The computer-readable storage medium provided by the embodiments of the present application is based on the same inventive concept as the method of the embodiments of the present application, and has the same beneficial effects as the method adopted, run or implemented by the application program stored therein.

[0246] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these adjustments and modifications of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these changes and modifications.

Claims

1. A method for rapid assessment of power system security and stability, characterized in that: include: Pixelate the steady-state characteristic variables of electric power obtained by measurement or generated by simulation, generate an offline three-channel pixelated image, and construct a sample set; The electrical quantity types of the electric power steady-state characteristic variables include: voltage, active power, and reactive power; The step of pixelating the steady-state characteristic variable of electric power obtained by measurement or generated by simulation to generate an offline three-channel pixelated image includes: According to the topological structure of the power grid, the power grid is pixelated by using the escape mechanism, and each element of the power grid is mapped to each plane figure in the basic image; the basic image includes a non-bus basic image and a bus basic image; the various elements of the power grid include: bus, line, generator and load; According to the determined position of the generator in the power grid topology diagram, each generator is mapped as a first figure in the non-bus basic image; according to the determined position of the load in the power grid topology diagram, each load is mapped as a second figure in the non-bus basic image; according to the determined position of the line in the power grid topology diagram, each line is mapped as a third figure in the non-bus basic image; according to the determined position of the bus in the power grid topology diagram, each bus is mapped as a fourth figure in the bus basic image; Mapping the power steady-state characteristic variable to the non-bus basic image to generate an active power pixelated image and a reactive power pixelated image; Mapping the power steady-state characteristic variable to the bus basic image to generate a voltage pixelated image, The active power values ​​of each line, each generator, and each load in the acquired electric power steady-state characteristic variables are respectively mapped to pixel values ​​of the plane graphics corresponding to each element; in the non-bus basic image, the pixel values ​​of each pixel point in the plane graphics corresponding to each line, each generator, and each load are respectively updated to obtain an active power pixelized image; The reactive power values ​​of each line, each generator, and each load in the acquired electric power steady-state characteristic variables are respectively mapped to the pixel values ​​of the plane graphics corresponding to each element; in the non-bus basic image, the pixel values ​​of each pixel point in the plane graphics corresponding to each line, each generator, and each load are respectively updated to obtain a reactive power pixelated image; The voltage value of each bus in the acquired power steady-state characteristic variable is mapped to the pixel value of the plane figure corresponding to each bus; in the bus basic image, the pixel value of each pixel point in the plane figure corresponding to each bus is updated to obtain 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; Using the constructed sample set, a fusion model based on a deep residual network and a Transformer is trained, and the trained fusion model is used for rapid safety and stability assessment of a power system; The method of using the constructed sample set to train a fusion model based on a deep residual network and a Transformer includes: The three-channel pixelated image corresponding to each sample in the sample set is used as the input of the deep residual network, the matrix feature map generated by the deep residual network is used 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 used as the output of the Transformer based on the multi-head attention mechanism, wherein the deep residual network performs feature selection on the input pixelated image, and selects feature variables with a high degree of correlation with the transient stability of the power grid to form an optimal feature set; the transient stability label is system stability or system instability; The sample set is input into the constructed fusion model based on ResNet and Transformer for training until the model converges; the loss function adopts the cross entropy loss function for classification, and the optimization method adopts the gradient descent method; The mapping between the three-channel pixelated images corresponding to each sample and the transient stability state of the power grid is established, and the mapping relationship between the steady-state characteristic variables of the power grid and the transient stability of the power grid is established by the constructed fusion model; The electric power steady-state characteristic variables measured in real time by the phasor measurement unit and the wide-area measurement system set by the power grid control system are pixelated to generate an online three-channel pixelated image; the online three-channel pixelated image generated by processing the trained fusion model is used, and the output of the Transformer based on the multi-head attention mechanism in the trained fusion model is used as the generated power system transient stability state assessment conclusion, and sent to the power grid control system to realize the perception of the power grid situation within milliseconds. The power system transient stability state assessment conclusion is system stability or system instability.

2. The method for rapid assessment of power system safety and stability according to claim 1, characterized in that: The constructing of the sample set includes: Using the pre-built power grid time-domain simulation model, we set up faults that may cause system instability for a variety of typical power grid operation modes, simulate the power grid offline, and obtain the state quantity of the power grid when it is running stably before the fault is injected; Selecting multiple electrical quantities used to characterize the transient stability of the system from the state quantities of the power grid during stable operation before the injection of faults obtained under various typical power grid operation modes as power steady-state characteristic variables; Pixelating the selected power steady-state characteristic variables to generate multiple sets of off-line three-channel pixelated images; Each group of three-channel pixelated images and their corresponding transient stable labels are combined into samples to form a sample set.

3. The method for rapid assessment of power system safety and stability according to claim 1, characterized in that: The deep residual network includes n residual modules, where n is a natural number not less than 3; The deep residual network processes three-channel pixelated images, including: The acquired three-channel pixelated image is used as input for standard convolution processing to obtain a standard convolution result; Performing maximum pooling on the standard convolution result to obtain a maximum pooling result; On the residual path, the maximum pooling result is used as input and sequentially passes through N1 first residual modules connected in series to generate a first residual module group processing result; The processing result of the i-th residual module group is taken as input, and sequentially passes through N (i+1) series-connected (i+1)-th residual modules to generate the processing result of the (i+1)-th residual module group, where i is greater than or equal to 1 and less than n; The generated nth residual module group processing result is used as the matrix feature map output after being processed by the deep residual network.

4. The method for rapid assessment of power system safety and stability according to claim 1, characterized in that: The Transformer based on the multi-head attention mechanism includes multiple Transformer encoder modules, position encoding modules, and classification information modules; The Transformer encoder module includes a multi-head attention layer, a feedforward network layer, a residual connection unit and a layer normalization unit.

5. The method for rapid assessment of power system safety and stability according to claim 1, characterized in that: The training is based on a fusion model of a deep residual network and a Transformer, including: The accuracy, precision, recall and F1 value based on the confusion matrix are used to construct evaluation indicators to evaluate the performance of the fusion model.

6. A device for rapid assessment of power system safety and stability, characterized in that: The method for realizing the rapid assessment of power system safety and stability as claimed in claim 1 comprises: A sample set construction unit is used to pixelate the steady-state characteristic variable of electric power obtained by measurement or generated by simulation, generate an offline three-channel pixelated image, and construct a sample set; the electrical quantity types of the steady-state characteristic variable of electric power include: voltage, active power, and reactive power; A fusion model training unit, used to train a fusion model based on a deep residual network and a Transformer using the constructed sample set, wherein the trained fusion model is used for rapid safety and stability assessment of a power system; The transient stability assessment unit is used to pixelate the real-time measured power steady-state characteristic variables to generate an online three-channel pixelated image; and use the trained fusion model to process the generated online three-channel pixelated image to generate a transient stability state assessment conclusion of the power system.

7. A terminal, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 5.