Automatic Conversion Method and System from PSASP Electromechanical Transient Model to RTDS Electromagnetic Transient Model
By preprocessing PSASP data, identifying topology layers, and automatically laying out the data, combined with RTDS' RSCAD simulation software, an automatic conversion from the PSASP electromechanical transient model to the RTDS electromagnetic transient model was achieved. This solved the problems of low efficiency and poor accuracy in existing technologies, and the generated model conforms to engineering cognitive habits and has efficient and accurate simulation results.
Patent Information
- Application Number
- CN202611167542.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-11-17
AI Technical Summary
In the existing technology, the conversion from PSASP electromechanical transient model to RTDS electromagnetic transient model relies on manual operation, which is inefficient and prone to errors. It cannot achieve automated data parsing, topology identification, and model generation, resulting in low accuracy and efficiency of the simulation model.
The method employs data preprocessing and parsing, topology hierarchical identification, automatic layout, and automatic model construction. This includes format parsing and homology isometry processing of PSASP data, identification of plant boundaries based on island search technology, layout using an improved Fruchterman-Reingold force-directed algorithm, and automatic conversion of model files using RTDS' RSCAD simulation software.
It achieves efficient and accurate automatic conversion from PSASP electromechanical transient data to RTDS electromagnetic transient simulation models, improving the speed and accuracy of electromagnetic transient modeling for large-scale power grids. The generated simulation models are intuitive and easy to analyze, and the simulation results are realistic and reliable.
Smart Images

Figure CN123116779A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system simulation technology, specifically to an automatic conversion method and system for PSASP electromechanical transient models to RTDS electromagnetic transient models. Background Technology
[0002] Data from power system electromechanical transient simulations (such as PSASP, Power System Analysis Software Package) are typically used for power flow and stability calculations across the entire network. Their data structure is characterized by a large number of nodes and a flattened topology. Specifically, the data indiscriminately lays out all equipment (generators, buses, transformers, etc.) within all power plants and substations, as well as the transmission lines between them, and uses numerous "short-circuit" connections that only represent logical connections to describe complex wiring within substations (such as 3 / 2 connections). This data organization method obscures the true physical topology, resulting in severe structural chaos and data redundancy.
[0003] Currently, the conversion from PSASP electromechanical transient models to RTDS (Real-Time Digital Simulator) electromagnetic transient models relies primarily on manual work by engineers. This process is not only inefficient but also highly prone to errors in multiple stages, including data parsing, topology reconstruction, and parameter configuration. Existing technologies and methods mainly suffer from the following four interrelated bottlenecks:
[0004] 1. Data level: Lack of intelligent parsing and adaptation processing of source data.
[0005] PSASP data often involves equivalent merging of coherent generator sets; direct conversion can lead to model accuracy loss or scaling issues. Existing methods lack automated analytical and equivalent processing mechanisms, failing to provide input data that balances scale and accuracy for electromagnetic transient simulations.
[0006] 2. Topology level: Unable to automatically identify the actual plant and network structure.
[0007] Faced with flat data containing massive amounts of "short-circuit connections", existing tools struggle to automatically and accurately identify the boundaries of physical plants and stations, and are unable to remove invalid connections. Consequently, they cannot reconstruct the clear physical connection relationships between "inter-station" and "intra-station", resulting in a lack of correct structural foundation for subsequent modeling.
[0008] 3. Visualization: The automatically generated topology diagram has poor readability.
[0009] In the model visualization stage, traditional automatic layout algorithms (such as force-directed algorithms) can cause layout chaos, resulting in a large number of intersections and overlaps, when dealing with graph structures with strong hierarchical (voltage level) structures such as power grids due to global force balance. The generated drawings do not conform to the cognitive habits of engineers and are difficult to use for manual review.
[0010] 4. Application level: It is not possible to achieve one-click automatic generation of simulation models.
[0011] Ultimately, the break in the aforementioned links prevented the "last mile" from data to a workable model from being completed. Engineers still had to manually rebuild the topology, configure parameters, and initialize the power flow in software such as RSCAD (RTDS Computer-Aided Design). The entire process was time-consuming, labor-intensive, and prone to introducing human error, severely limiting the application efficiency of electromagnetic transient simulation.
[0012] Therefore, there is an urgent need for an automated conversion method that can connect the entire process from data parsing, topology identification, automatic layout to model generation, in order to solve the fundamental efficiency and accuracy problems in the conversion from PSASP to RTDS models. Summary of the Invention
[0013] To address the aforementioned problems, the present invention aims to provide an automatic conversion method and system for PSASP electromechanical transient models to RTDS electromagnetic transient models. This method and system solves the technical challenges of low efficiency, difficulty in topology reconstruction, chaotic layout, and difficulty in ensuring physical consistency of models in existing technologies. It achieves efficient, accurate, and fully automatic conversion from PSASP electromechanical transient data to RTDS electromagnetic transient simulation models. The technical solution is as follows:
[0014] An automatic conversion method from PSASP electromechanical transient model to RTDS electromagnetic transient model includes the following steps performed in sequence:
[0015] Data preprocessing and parsing steps: The PSASP electromechanical transient source data is parsed in format, the equipment models and parameters of the entire network are extracted, and the co-correlation equivalent generator sets are identified and adapted to generate a standardized power grid data set.
[0016] Topology layer identification steps: Based on island search technology, intelligent identification and reduction of plant boundaries and network structure in the standardized power grid data are performed to form a clear and simplified two-layer data structure of inter-station topology and intra-station topology.
[0017] Automatic layout steps: Based on voltage level hierarchical constraints, the improved Fruchterman-Reingold force-directed algorithm is used to automatically calculate the layout of the inter-station topology and intra-station topology, generating visual coordinates that conform to the physical hierarchy of the power grid and engineering cognition habits;
[0018] Automatic model construction steps: By parsing the underlying encoding rules of the engineering model file of the RSCAD simulation software of RTDS, the standardized power grid data, the two-layer topology and the visualization coordinates are automatically converted and written according to the rules to generate an RTDS electromagnetic transient simulation model file that can be directly loaded and run by RSCAD. Then, the power flow is initialized on the model based on the PSASP power flow calculation results.
[0019] An automatic conversion system from PSASP electromechanical transient model to RTDS electromagnetic transient model includes:
[0020] The data preprocessing and parsing module is used to parse the PSASP electromechanical transient source data in the format, extract the network equipment model and parameters, identify and adapt the co-modulation equivalent generator sets, and generate a standardized power grid data set.
[0021] The topology layer identification module is used to intelligently identify and reduce the plant boundaries and network structure in the standardized power grid data based on island search technology, forming a clear two-layer data structure of inter-station topology and intra-station topology.
[0022] The automatic layout module is used to automatically calculate the layout of the inter-station topology and intra-station topology based on voltage level hierarchical constraints and using an improved Fruchterman-Reingold force-oriented algorithm, generating visual coordinates that conform to the physical hierarchy of the power grid and engineering cognition habits.
[0023] The automatic model building module is used to automatically convert and write the standardized power grid data, two-layer topology and the visualization coordinates according to the rules by parsing the underlying encoding rules of the engineering model file of the RSCAD simulation software of RTDS, generating an RTDS electromagnetic transient simulation model file that can be directly loaded and run by RSCAD, and performing power flow initialization on the model based on the PSASP power flow calculation results.
[0024] The beneficial effects of this invention are:
[0025] 1) This invention, through a complete automated process, from reading and parsing PSASP data, performing coherence equivalence identification and adaptation processing, intelligent topology identification, automatic layout, to generating RTDS model files, greatly improves the speed and accuracy of large-scale power grid electromagnetic transient modeling without manual intervention.
[0026] 2) This invention intelligently handles the generator set equivalence problem in PSASP data through the "data preprocessing" stage, providing high-quality and scalable input for subsequent steps.
[0027] 3) This invention automatically clusters complex nodes into substations using "island search technology," and removes short-connections and merges nodes, generating a clear two-layer topology of "inter-substation" and "intra-substation." This significantly reduces the complexity and computational scale of the model, making electromagnetic transient simulation of large-scale power grids feasible.
[0028] 4) The "voltage-level hierarchical F&R (improved Fruchterman-Reingold force-directed algorithm) layout method" proposed in this invention generates a substation node topology diagram that is "uniformly laid out, has fewer crossing lines, and has good visual effects" by hierarchically laying out the substation from high voltage level to low voltage level and allowing manual fine-tuning of key nodes. This makes the generated simulation model interface intuitive and easy for power system analysts to identify and operate.
[0029] 5) The automatic modeling method of this invention achieves direct and accurate conversion from data structure to simulation file byte stream by precisely parsing the underlying encoding rules of the RTDS .dfx file. This method not only assigns parameters "referring to the device model in PSASP," but also performs "power flow initialization" based on the PSASP power flow results after model generation. This ensures that the automatically generated RTDS model is strictly consistent with the original data in file format, topology, and steady-state starting point, resulting in realistic and reliable simulation results. Attached Figure Description
[0030] Figure 1 This is a flowchart of using a depth-first search algorithm to find electrical islands.
[0031] Figure 2 This is a flowchart of the F&R layout method based on voltage level hierarchy.
[0032] Figure 3 This is the overall flowchart of RTDS automatic modeling in the method of this invention.
[0033] Figure 4 It refers to the encoding rules for .dfx files.
[0034] Figure 5 This is the overall flow of the automatic conversion method described in this invention. Detailed Implementation
[0035] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0036] This invention provides a novel fully automated conversion pipeline. Its core concept lies in: firstly, parsing and coordinating the PSASP data with the unit through "data parsing and preprocessing"; then, intelligently reducing and structuring the preprocessed data through "topology hierarchical identification" to form clear inter-station and intra-station topologies; next, using "hierarchical automatic layout" to transform the structured data into visual coordinates that conform to human voltage level cognition; and finally, using "rule parsing and modeling" to generate the coordinates and data into an RTDS simulation model file with one click, thereby overcoming the complete technical chain of automatic conversion from PSASP data to RTDS model.
[0037] As attached Figure 5 As shown, the overall process of the automatic conversion method described in this invention includes four core steps: data preprocessing and parsing, topology hierarchical identification, automatic layout, and automatic model construction. The following example, which converts power grid PSASP data to an RTDS model, illustrates the specific implementation of each step.
[0038] This embodiment takes the PSASP electromechanical transient data (including .dtl power flow files and .sav stability files) of a certain regional power grid as input and automatically generates the corresponding RTDS simulation model through the following steps.
[0039] Step 1: Data Preprocessing and Analysis
[0040] The PSASP electromechanical transient source data is parsed to extract the network equipment models and parameters. The co-tuning equivalent generator sets are identified and adapted to generate a standardized power grid data set.
[0041] This step corresponds to Figure 5 The purpose of the "data preprocessing and parsing" step is to process the raw PSASP data, which may contain equivalent units, into a standardized, structured data set that can be used in subsequent steps.
[0042] 1) Data reading and format parsing:
[0043] The system reads in PSASP electromechanical transient data files (such as .dtl power flow files, .sav stability files, etc.) and parses the component models and parameters of generators, loads, transformers, lines, buses, etc. Specifically, it calls a dedicated parser to read the PSASP .dtl and .sav files. The parser identifies fixed-format fields in the files and extracts the model identifiers and parameters of all buses, generators (including equivalent generators), loads, transformers, AC lines, reactive power compensation equipment, etc., forming an initial data table.
[0044] For potential coherent equivalent generator groups within the data, the equivalent parameters of the equivalent generator are calculated based on parameters such as the capacity and inertia time constant of each original generator within the coherent generator group. Alternatively, depending on the level of detail required for the electromagnetic transient simulation model, a decision can be made on whether to reconstruct multiple detailed generator models, thereby achieving a balance between model accuracy and simulation scale.
[0045] 2) Handling of synchronized shift units:
[0046] The system identifies records marked "equivalent generator" in the initial data table. As a preferred embodiment, the system uses a weighted average method to process the co-located units. Specifically, this method is based on the rated capacity of each generator in the original unit group represented by the equivalent generator. and inertial time constant Calculate the equivalent inertia of the equivalent machine using the following formula. :
[0047] ;
[0048] The system provides options that allow users to choose to retain the current machine model or restore it to a group of units consisting of multiple detailed generator models, depending on the simulation accuracy requirements.
[0049] 3) Data Standardization and Verification: All parameters are converted to a unified unit system (e.g., power base value is MVA, voltage is kV), and the integrity of key parameters such as transformer turns ratio and line impedance is verified, with abnormal data marked. The final output is a standardized power grid data set containing complete information on nodes, branches, generators, and loads, which is used for subsequent topology identification and model conversion, laying the foundation for topology identification.
[0050] Step 2: Topology Hierarchical Identification and Simplification Based on Electrical Island Search
[0051] Based on island search technology, the boundaries and network structure of power plants in the standardized power grid data are intelligently identified and reduced to form a clear two-layer data structure of inter-station topology and intra-station topology.
[0052] This step corresponds to Figure 5 The process for the "topology layer identification" step is as follows: Figure 1 As shown. The goal is to intelligently identify physical plants from flat data and construct a clear two-layer topology of "inter-plant-inter-plant".
[0053] 1) Construct a full topology branch table: Read in the power grid data set output in step one, and stitch together all the device connection relationships into a full topology branch table containing the first node, the last node, and the branch type identifier.
[0054] 2) Identifying electrical islands to delineate substations: Branches of type inter-station AC transmission line are deleted from the full topology branch table to obtain the island branch table. Subsequently, a graph search algorithm (such as depth-first search) is used to traverse this table. (See attached table.) Figure 1 As shown, the algorithm starts from any unvisited node and traverses all nodes reachable through branches in the "island branch table". These nodes form a connected subgraph, i.e., an electrical island, corresponding to a physical plant. After the traversal is completed, a node-plant mapping table is generated.
[0055] 3) Generate a two-layer topology description: Based on the node-plant correspondence table, replace the two ends of the branches in the entire network with their respective plants, and delete the branches whose two ends are the same plant, and generate an inter-station topology that describes the connection relationship between plants.
[0056] For each plant, its internal branches are analyzed, short-circuit wires with approximately zero impedance that only serve a logical connection function are automatically deleted, and electrically directly connected nodes are merged to generate a simplified plant topology.
[0057] At this point, the chaotic raw data has been transformed into a well-structured two-layer network model.
[0058] Step 3: Automatic Topology Layout Based on Voltage Level Hierarchy
[0059] Based on voltage level hierarchical constraints, an improved Fruchterman-Reingold force-directed algorithm is used to automatically calculate the layout of the inter-station topology and intra-station topology, generating visual coordinates that conform to the physical hierarchy of the power grid and engineering cognition habits.
[0060] This step corresponds to Figure 5 The core algorithm flow of the "automatic layout" step is shown in the attached figure. Figure 2 As shown. The purpose is to generate a uniformly laid-out, voltage-level-hierarchical, and visual wiring diagram for the topology obtained in step two.
[0061] 1) Data preparation and adjacency matrix construction: Based on the simplified two-layer topology, construct an adjacency matrix A (as shown in Equation (1)) containing all plant nodes and a branch number matrix B (as shown in Equation (2)).
[0062] Wherein, the adjacency matrix A is an n×n square matrix, and the elements of the adjacency matrix A are defined as shown in equation (1):
[0063] (1);
[0064] The elements in the adjacency matrix A can be represented as submatrices A=[A1 A2 ...A...] divided into blocks according to different voltage levels. nA1 represents the adjacency matrix of the first voltage level network, A2 represents the adjacency matrix of the first and second voltage level networks, and so on. n This represents the adjacency matrix of the first n voltage level networks.
[0065] The branch number matrix B has the same structure as the adjacency matrix A, and the element definitions are as shown in equation (2):
[0066] (2);
[0067] In the formula, Represents a node and The number of connected branches.
[0068] 2) Layered force-guided iterative layout: This invention adopts the improved Fruchterman-Reingold force-guided algorithm (F&R algorithm), whose force model is shown in formulas (3) to (7). The key improvement of the algorithm is the introduction of voltage level layered constraints.
[0069] The voltage-level hierarchical F&R layout method is as follows:
[0070] Nodes at both ends of connected branches and The definitions of the gravitational force between nodes and the repulsive force between nodes are shown in equation (3). The gravitational force between unconnected nodes is zero.
[0071] (3);
[0072] In the formula, This represents the repulsive force between nodes. Let represent the attractive force between connected nodes, k represent the ideal distance between nodes, and r represent the repulsive force adjustment factor between nodes. This represents the gravitational adjustment factor between connected nodes. The distance between nodes is represented by Euclidean distance, W and H represent the width and height of the drawing canvas, respectively, and n represents the total number of nodes.
[0073] To facilitate the calculation of the distance and direction that each node needs to move, attractive and repulsive forces are defined in the x and y directions of the coordinate axis.
[0074] (4);
[0075] In the formula, The x-axis component represents the repulsive force. The y-axis component represents the repulsive force. Represents the x-axis component of gravity. Represents the y-axis component of gravity. and For nodes x and y coordinates; and For nodes The x and y coordinates.
[0076] According to the repulsive force calculation formula, the greater the distance between nodes, the smaller the repulsive force. For large-scale power systems with a huge number of nodes, to reduce the computational load, the repulsive force between nodes can be calculated only within a certain distance range. The calculated attractive and repulsive forces can be used to calculate the resultant force of each node, which represents the distance and direction in which each node needs to move.
[0077] The resultant force of each node and the distance to be moved in the x and y directions are defined as shown in equations (5) and (6). For nodes with user-specified coordinates, they are only allowed to move within a small range.
[0078] (5);
[0079] (6);
[0080] In the formula, Represents a node The sum of the x-axis components of the repulsive force. Represents a node The sum of the y-axis components of the repulsive force. Represents a node The sum of the x-axis components of the gravitational force acting on the body. Represents a node The sum of the y-axis components of the gravitational force acting on the body. and Representing nodes respectively The distance moved in the x-axis and y-axis directions. The maximum movement distance for the specified locked node; N is the total number of nodes in the current computation graph; For nodes The set of directly connected neighbor nodes.
[0081] The coordinates of each node after m iterations are represented as follows:
[0082] (7);
[0083] in, and To iterate through the nodes after m-1 iterations The coordinates; and These represent the nodes after m-1 iterations. The distance moved in the x-axis and y-axis directions.
[0084] After the coordinates are moved, if the node coordinates exceed the canvas area, the coordinates need to be moved a certain distance into the canvas.
[0085] As attached Figure 2 As shown in the flowchart, the system first runs the F&R algorithm to lay out nodes only for a subset of nodes at the highest voltage level (e.g., 500kV). Users can drag and fine-tune the layout results and lock the coordinates. Then, nodes at the next voltage level (e.g., 220kV) are added. While calculating the attractive / repulsive forces on these nodes from nodes at the same level, the connections between these nodes and the locked high-voltage level nodes are treated as attractive constraints, and the coordinates are calculated iteratively again. This process is repeated layer by layer until all voltage levels are laid out. This method effectively avoids the chaos of global layout in traditional algorithms and ensures that the layout results conform to the physical structure of the power grid and engineering understanding.
[0086] The reason this invention adopts a hierarchical layout based on voltage levels is that traditional force-directed algorithms treat all nodes equally, which can easily lead to chaotic layouts with local optima in a grid graph with a strong hierarchical structure (voltage levels). This invention forces the processing according to voltage levels from high to low, which is equivalent to first fixing the backbone network (500kV) and then allowing the distribution network (220kV, etc.) to expand around the backbone network. This conforms to the physical reality of the power grid and the cognitive habits of engineers.
[0087] 3) Coordinate output: After the layout is completed, output the coordinates (x, y) of each plant and its main equipment on the drawing.
[0088] Step 4: Automatic generation of electromagnetic transient simulation model of power system based on RTDS
[0089] By parsing the underlying encoding rules of the engineering model file of the RSCAD simulation software of RTDS, the standardized power grid data, the two-layer topology and the visualization coordinates are automatically converted and written according to the rules to generate an RTDS electromagnetic transient simulation model file that can be directly loaded and run by RSCAD. Then, the power flow is initialized on the model based on the PSASP power flow calculation results.
[0090] This step builds upon the simplified topology, standardized parameters, and layout coordinates obtained in the previous three steps, ultimately automatically generating a runnable electromagnetic transient simulation model within the RTDS RSCAD software environment. The overall workflow for this step is attached. Figure 3 As shown.
[0091] The core of this step lies in parsing and following the encoding rules of RSCAD simulation model files (.dfx / .dft format), automatically writing structured data into the corresponding format. RSCAD simulation files are stored in text format and contain all modeling information, including component parameters, types, coordinates, and electrical connections. (Appendix) Figure 4The document demonstrates the encoding structure of the file, showing that a precise description of the model can be achieved by writing corresponding data at fixed locations.
[0092] The specific implementation process is as follows:
[0093] 1) Modeling Scope Specification: On the power grid wiring diagram generated in step three, the user interactively selects the specific area to be modeled. The system extracts the hierarchical topology, equipment parameters, and layout coordinates of all substations within this area as input for this step.
[0094] 2) Automatic generation of model structure:
[0095] The core of the automatic model construction and power flow initialization method based on RTDS .dfx file encoding parsing lies in automatically constructing a simplified power grid topology, equipment parameters, and layout coordinates into an electromagnetic transient simulation model that conforms to the simulator format and can be directly executed by parsing the underlying encoding rules of the engineering model file (.dfx format) of the RTDS / RSCAD simulation software.
[0096] Based on the parsed .dfx file encoding template, the system automatically constructs the model file structure in the following order:
[0097] (a) Create pages and modules: Create independent modules (subsystems) for each plant, and automatically generate the internal topology based on the plant topology data and layout coordinates.
[0098] File rule parsing reverse-engineers the fixed encoding format and structure of circuit model files (.dfx format) in the RTDS simulation software RSCAD, and deciphers the syntax and byte rules of its components such as file header, page block, component definition block, and connection definition block.
[0099] (b) Constructing the main network structure: Based on the "inter-station topology" data, the transmission line model connecting each plant module is automatically generated in the top-level page (usually using the Bergeron model).
[0100] Model construction and parameter assignment: Referring to the equipment model in PSASP electromechanical transient calculation, the corresponding electromagnetic transient simulation element is established in RSCAD, and values are assigned to it according to the standardized PSASP parameters obtained from the preprocessing stage.
[0101] (c) Parameter writing and initialization: Fill the standardized equipment parameters generated in step one into the definition fields of the corresponding components. At the same time, based on the electromechanical transient power flow calculation results, write the steady-state values such as generator output and load power into the model to complete the power flow initialization and ensure that the model has the correct simulation starting point.
[0102] The operation state writing and power flow initialization are based on the power flow results of PSASP electromechanical transient simulation. The operation mode data such as generator start-up output and load size are written into the model, and the generator power angle is initialized so that the generated electromagnetic transient model has an initial operation state consistent with the original data, ensuring that the simulation can quickly enter a steady state.
[0103] 3) Model Output: Finally, the system outputs a complete RTDS simulation project file conforming to the .dfx format. This file can be directly loaded into RSCAD software. The model already has the correct electrical structure, equipment parameters, and initial operating state, and can be compiled and used immediately for electromagnetic transient simulation.
Claims
1. An automatic conversion method from PSASP electromechanical transient model to RTDS electromagnetic transient model, characterized in that, The steps are executed in the following order: Data preprocessing and parsing steps: The PSASP electromechanical transient source data is parsed in format, the equipment models and parameters of the entire network are extracted, and the co-correlation equivalent generator sets are identified and adapted to generate a standardized power grid data set. Topology layer identification steps: Based on island search technology, intelligent identification and reduction of plant boundaries and network structure in the standardized power grid data are performed to form a clear and simplified two-layer data structure of inter-station topology and intra-station topology. Automatic layout steps: Based on voltage level hierarchical constraints, the improved Fruchterman-Reingold force-directed algorithm is used to automatically calculate the layout of the inter-station topology and intra-station topology, generating visual coordinates that conform to the physical hierarchy of the power grid and engineering cognition habits; Automatic model construction steps: By parsing the underlying encoding rules of the engineering model file of the RSCAD simulation software of RTDS, the standardized power grid data, the two-layer topology and the visualization coordinates are automatically converted and written according to the rules to generate an RTDS electromagnetic transient simulation model file that can be directly loaded and run by RSCAD. Then, the power flow is initialized on the model based on the PSASP power flow calculation results.
2. The automatic conversion method from PSASP electromechanical transient to RTDS electromagnetic transient model according to claim 1, characterized in that, The data preprocessing and parsing steps specifically include: Step 0a: Read in the PSASP electromechanical transient data file and parse the generator, load, transformer, line, bus component models and parameters; for the merged equivalent generator group in the data, calculate the equivalent parameters of the equivalent machine based on the parameters of each original machine, or select to restore it to multiple detailed generator models according to the model detail requirements of the electromagnetic transient simulation. Step 0b: Standardize the parsed equipment parameters, unify the unit system, and verify the data integrity to form a complete set of standardized power grid data.
3. The automatic conversion method from PSASP electromechanical transient to RTDS electromagnetic transient model according to claim 1, characterized in that, The topology hierarchical identification step specifically includes: Step 1a: Read in the standardized power grid data set, splice and deconstruct it into a full topology branch table with labels; Step 1b: Delete the inter-station AC transmission lines from the full topology branch table to form an island branch table; use a graph search algorithm to traverse the island branch table, identify all electrical islands, each electrical island corresponds to a physical plant, and generate a node-plant correspondence table; Step 1c: Based on the node-plant correspondence table, replace the two ends of the entire network branch with the corresponding plant, and delete the branches with the same plant at both ends, generating an inter-station topology describing the connection relationship between plants; Step 1d: For each plant, identify the equipment connection relationships from its internal branches, and generate a simplified internal topology by deleting short wires and merging nodes.
4. The automatic conversion method from PSASP electromechanical transient to RTDS electromagnetic transient model according to claim 3, characterized in that, In step 1b, an adjacency matrix is formed based on the island branch table, and a depth-first search algorithm is used to find all electrical islands in the island branch table.
5. The automatic conversion method from PSASP electromechanical transient to RTDS electromagnetic transient model according to claim 1, characterized in that, In the automatic layout step, the first step is to prepare data and construct the adjacency matrix, specifically as follows: Based on the simplified two-layer topology, an adjacency matrix A containing all plant nodes and a branch number matrix B are constructed. The adjacency matrix A is an n×n square matrix, and the elements of the adjacency matrix A are defined as follows: (1); The elements in the adjacency matrix A are represented as submatrices A=[A1 A2 ...A...] divided into blocks according to different voltage levels. n A1 represents the adjacency matrix of the first voltage level network, and A2 represents the adjacency matrix of the first and second voltage level networks; A n This represents the adjacency matrix of the first n voltage level networks; The branch number matrix B has the same structure as the adjacency matrix A, and its elements are defined as follows: (2); In the formula, Represents a node and The number of connected branches.
6. The automatic conversion method from PSASP electromechanical transient to RTDS electromagnetic transient model according to claim 5, characterized in that, In the automatic layout step, the force model of the improved Fruchterman-Reingold force-directed algorithm is defined as follows: Nodes at both ends of the connected branch and The gravitational force between nodes and the repulsive force between nodes are defined as follows: (3); In the formula, This represents the repulsive force between nodes. Let represent the attractive force between connected nodes, k represent the ideal distance between nodes, and r represent the repulsive force adjustment factor between nodes. This represents the gravitational adjustment factor between connected nodes. The distance between nodes is represented by W and H, which represent the width and height of the drawing canvas, respectively, and n represents the total number of nodes. The attractive and repulsive forces are defined in the x and y directions of the coordinate axes: (4); In the formula, The x-axis component represents the repulsive force. The y-axis component represents the repulsive force. Represents the x-axis component of gravity. Represents the y-axis component of gravity. and For nodes x and y coordinates; and For nodes x and y coordinates; The resultant force at each node and the distance to be moved in the x and y directions are defined as follows: (5); (6); In the formula, Represents a node The sum of the x-axis components of the repulsive force. Represents a node The sum of the y-axis components of the repulsive force. Represents a node The sum of the x-axis components of the gravitational force acting on the body. Represents a node The sum of the y-axis components of the gravitational force acting on the body. and Representing nodes respectively The distance moved in the x-axis and y-axis directions. The maximum movement distance for the specified locked node; N is the total number of nodes in the current computation graph; For nodes The set of directly connected neighbor nodes; The coordinates of each node after m iterations are represented as follows: (7); in, and To iterate through the nodes after m-1 iterations The coordinates; and These represent the nodes after m-1 iterations. The distance moved in the x-axis and y-axis directions.
7. The automatic conversion method from PSASP electromechanical transient to RTDS electromagnetic transient model according to claim 1, characterized in that, In the automatic layout step, the voltage level-based hierarchical constraint adopts the following layer-by-layer iterative strategy: Determine the node subsets of each layer according to voltage level from high to low; First, the improved Fruchterman-Reingold force-directed algorithm is run on the highest voltage level node subset to perform layout calculations. After the layout is completed, the coordinates of the nodes in this layer are locked. The next voltage level node subset is added to the layout in sequence. In the force-guided iterative calculation, the locked high voltage level node coordinates are used as fixed gravitational constraints to participate in the calculation. After the current layer node layout is completed, its coordinates are locked. Repeat the above process, layer by layer downwards, until all voltage levels are laid out.
8. The automatic conversion method from PSASP electromechanical transient to RTDS electromagnetic transient model according to claim 1, characterized in that, The automatic model construction steps specifically include: Step 2a: File rule parsing. Reverse analyze the fixed encoding format and structure of the circuit model file of the RSCAD software in RTDS to understand the syntax and byte rules of its file header, page block, component definition block and connection definition block. Step 2b: Model construction and parameter assignment. Based on the inter-station topology and intra-station topology, establish corresponding electromagnetic transient simulation elements in RSCAD, and assign values to the elements based on the equipment parameters obtained from the standardized power grid data set. Step 2c: Power flow initialization. Based on the power flow calculation results of the PSASP electromechanical transient simulation, the generator start-up output, load size, and generator initial power angle data are written into the initial value field of the corresponding parameters of the model.
9. An automatic conversion system for PSASP electromechanical transient to RTDS electromagnetic transient model, characterized in that, include: The data preprocessing and parsing module is used to parse the PSASP electromechanical transient source data in the format, extract the network equipment model and parameters, identify and adapt the co-modulation equivalent generator sets, and generate a standardized power grid data set. The topology layer identification module is used to intelligently identify and reduce the plant boundaries and network structure in the standardized power grid data based on island search technology, forming a clear two-layer data structure of inter-station topology and intra-station topology. The automatic layout module is used to automatically calculate the layout of the inter-station topology and intra-station topology based on voltage level hierarchical constraints and using an improved Fruchterman-Reingold force-oriented algorithm, generating visual coordinates that conform to the physical hierarchy of the power grid and engineering cognition habits. The automatic model building module is used to automatically convert and write the standardized power grid data, two-layer topology and the visualization coordinates according to the rules by parsing the underlying encoding rules of the engineering model file of the RSCAD simulation software of RTDS, generating an RTDS electromagnetic transient simulation model file that can be directly loaded and run by RSCAD, and performing power flow initialization on the model based on the PSASP power flow calculation results.
