A method for constructing an off-line simulation model of a power grid based on an EMS system
By using the hierarchical global view mode mapping method of the EMS system, CIM/E and QS files are parsed and filtered to generate an offline power grid analysis model. This solves the problems of large granularity and poor real-time performance of existing power grid simulation models, and realizes near real-time power flow calculation for 110 kV and below power grids.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID HUBEI ELECTRIC POWER CO LTD WUHAN POWER SUPPLY CO
- Filing Date
- 2023-12-25
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies make it difficult to directly extract and map power grid data of the target area from the EMS system, resulting in offline simulation models with large granularity and poor real-time performance, which cannot meet the simulation calculation requirements of 110 kV and below power grids.
The hierarchical global view pattern mapping method is adopted. CIM/E files and QS files are obtained through the EMS system, the data is parsed and filtered to form intermediate views and global views. Combined with the pattern matching system, the power grid data of the target area is filtered out, and boundary equivalence and topology verification are performed to generate an offline power grid analysis model.
It improves the flexibility and real-time performance of offline simulation models, meets the needs of power grid controllers for near real-time power flow calculation and analysis of local power grids, and enhances the realism and real-time performance of simulation models.
Smart Images

Figure CN117763848B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power grid dispatching technology, and in particular to a method for constructing an offline simulation model of a power grid based on an EMS system. Background Technology
[0002] EMS (Energy Management System) is widely used in power dispatching and control agencies at all levels. Through computer, communication, and automation technologies, it enables real-time monitoring and remote control of the power grid's operation, providing information support and control tools for grid dispatchers and ensuring the safe, economical, and optimized operation of the power grid. As required by power grid companies, each level of the organization has dedicated personnel for 24 / 7 uninterrupted maintenance of its EMS system to ensure that the system's topology model, operational data, and operating methods are largely consistent with actual conditions.
[0003] Currently, power system analysis software such as PASAP, MatPower, and BPA are widely used in power grid simulation analysis. These software programs perform offline calculations of power flow, short-circuit current, and transient stability using power grid simulation models. They offer greater computational flexibility and richer functionality than online analysis systems like EMS. However, because power grid models require manual construction and equipment parameters need to be manually adjusted, offline power grid simulation models generally have large granularity and poor real-time performance, making it difficult to perform simulation calculations for power grids at various voltage levels, especially 110 kV and below.
[0004] The EMS system can automatically generate CIM / E (General Model Description of Power Grid) files and QS (State Estimation Results) files. These two types of files essentially contain all the operational data of the power grid under the system's jurisdiction, forming the basis for online power flow calculations and inversion of power grid operating states. However, since the data in these two files represents the entire power grid data within the EMS system, directly extracting and filtering it into target area power grid data is quite difficult. Consequently, it is difficult to directly map this data into configuration files usable by various power system analysis software, failing to effectively reduce the workload of offline simulation modeling. Furthermore, neither a single CIM / E file nor a single QS file can be directly used for offline power grid analysis, as the file data content is insufficient to meet the needs of power grid simulation. Currently, there is no relevant technology in this field for constructing offline simulation power grid models based on the EMS system. Summary of the Invention
[0005] The purpose of this application is to provide a method for constructing an offline power grid simulation model based on an EMS system. The method adopts a hierarchical global view mode mapping, which can extract, parse, fuse, and filter CIM / E files and QS files of the EMS system according to requirements. This enables the mapping of massive near real-time data from the EMS system into dynamic model parameters in various offline power system simulation software, thereby improving the offline modeling and calculation capabilities of power grids at various levels and in various regions.
[0006] To achieve the above objectives, this application provides the following technical solution:
[0007] This application provides a method for constructing an offline simulation model of a power grid based on an EMS system, the specific steps of which are as follows:
[0008] Step 1: Obtain the near real-time CIM / E file and QS file to your local machine via the EMS system;
[0009] Step 2: Parse the data content of CIM / E files and QS files into intermediate data sources to form an intermediate view mode;
[0010] Step 3: Merge intermediate data sources by establishing a pattern matching system to form a global view;
[0011] Step 4: Use the intermediary mode to query and filter the power grid data files for the target area;
[0012] Step 5: Perform boundary equivalence on the target area power grid data file to pass topology verification and power balance verification;
[0013] Step 6: Map according to the target software format, import into the power system analysis software, and generate an offline power grid analysis model.
[0014] The principle of this invention is as follows:
[0015] In step 1, the specific process of obtaining the near real-time CIM / E file and QS file to the local machine through the EMS system is as follows:
[0016] 1) Use a Shell script to read and upload the earliest CIM / E file and QS file from the EMS server to the FTP server every 15 minutes;
[0017] 2) Download the latest CIM / E and QS files from the FTP server to the local machine every 15 minutes using a Shell script.
[0018] In step 2, the specific process of parsing the data content of CIM / E files and QS files into intermediate data sources to form an intermediate view mode is as follows:
[0019] Map the "classes" in the CIM / E files and QS files to tables in the CIM database and QS database, respectively, in the relational database.
[0020] 2) Map the "attributes" in the CIM / E file and QS file to columns in the CIM database table and QS database table, respectively;
[0021] 3) Map the "related attributes" in the CIM / E file and QS file to foreign keys in the relevant columns respectively;
[0022] 4) Using the regional tables in the CIM / E database and QS database as intermediate data sources, and the substations, busbars, transformers, generators, loads, capacitors, reactors, AC lines, and DC lines as underlying data sources, map them to the intermediate data sources to form an intermediate view:
[0023] Area_CIM / E(Substation,Busbar,Transformer,Generator,Measure,Capacitor,Reactor,AC_Line_Segment,DC_Line_Segment);
[0024] Area_QS(Sub,Bus,Trans,Gen,Load,Compenstor_P,Compenstor_S,AC_Line,DC_Line).
[0025] In step 3, the specific process of merging intermediate data sources by establishing a pattern matching system to form a global view is as follows:
[0026] 1) Establish a pattern matching system, including a matching module (matcher), a combining module (combiner), and a selection module (selector), as detailed below:
[0027] Matching module: Matches Area_CIM / E and Area_QS, using algorithms such as Euclidean distance, Jaccard similarity, cosine similarity, and Pearson similarity to calculate the similarity for each underlying data source, outputting multiple similarity matrices:
[0028] Combination Module: Combines the multiple similarity matrices output by the matching module into one, and calculates the similarity score between two elements using the following formula:
[0029]
[0030] Where k is the number of matching modules, and matcherscore(m,i,j) is the similarity score between si and tj output by the m-th matching module;
[0031] Selection module: The threshold method is used to select the data source. The bottom data source under all intermediate views with similarity scores greater than a given threshold can be used as the global view to merge the content feedback.
[0032] 2) Merge the two types of intermediate data sources, select the appropriate intermediate data source according to the pattern matching system, and form a global view:
[0033] Area(Substation,Bus,Trans,Gen,Measure,Compenstor_P,Compenstor_S,ACLine,DCLine).
[0034] In step 4, the specific process of using the intermediary pattern to query and filter the target area power grid data files is as follows:
[0035] 1) Convert the global view data source into an XML Schema to form a schema mapping M1 from the intermediate data source to the global view.
[0036] 2) Match the plants and equipment in the region to form a pattern mapping M2 from the data source to the intermediate data source;
[0037] 3) In the global view, XQuery is used to query the target area in the intermediary mode. The connection is established between the intermediate data source and the underlying data source through mapping M1, and the connection is established between the underlying data source and the intermediate data source in a hierarchical manner to obtain the power grid data file of the target area.
[0038] The Datalog language of XQuery is: Q(i): -P1(j1), ..., Pn(jn), where Q represents the query result, P1, ..., Pn points to XML Schema spatial data elements, P1(j1), ..., Pn(jn) are subqueries, and tuples i, j1, ..., jn are variables. The query is now complete.
[0039] In step 5, the boundary equivalence of the target area power grid data file is performed to ensure compliance with topology verification and power balance verification. The specific process is as follows:
[0040] 1) Perform corresponding equivalence processing on the target area power grid boundary according to four different situations: If the target area power grid is the entire network under the current EMS system, no further boundary equivalence is required; if the target area power grid boundary interface is a transformer and it is connected to a higher voltage level power grid, then the high-voltage side of the transformer is equivalent to a generator, and the initial power is the real-time measured value of the high-voltage side of the transformer; if the target area power grid boundary interface is a transformer and it is connected to a lower voltage level power grid, then the low-voltage side of the transformer is equivalent to a load, and the initial power is the real-time measured value of the low-voltage side of the transformer; if the target area power grid boundary interface is a tie line, then the opposite side of the tie line is equivalent to a load, and the initial power is the real-time measured value of the power flow on the opposite side of the tie line.
[0041] 2) Perform topology verification on the target area power grid data file after boundary equivalence is completed. Use the electrical island identification program to verify the connectivity of all nodes in the target area power grid data file. If all nodes in the target area power grid data file are interconnected, the topology verification is passed; otherwise, remove the corresponding redundant nodes or correct the corresponding unconnected nodes.
[0042] 3) For the target area power grid data file that passes the topology verification, the node power balance is verified using real-time measurement data in the CIM / E file. The node injected power error coefficient δ is set. If the injected power of any node is less than the error coefficient, the verification is passed; otherwise, the state estimation data in the QS file is used for nodes that fail the verification.
[0043] In step 6, the specific process of mapping according to the target software format and importing into the power system analysis software to generate an offline power grid analysis model is as follows:
[0044] 1) Import the target area power grid data file that has passed topology verification and power balance verification into an xls format file to form a set of power grid nodes;
[0045] 2) Modify the column names of the xls format file according to the requirements of different power system analysis software. Power system analysis software that supports xls import includes BPA, PSASP, Matpower, Pypower, etc.
[0046] 3) Depending on the actual situation, choose to import all new projects or incrementally import existing projects, and import them through the UPI interface programs of each software.
[0047] 4) For components in the target area's power grid data file that are present but not matched with the power system analysis team, a simulation model is generated using typical settings.
[0048] Compared with the prior art, the beneficial effects of this application are:
[0049] This invention employs a hierarchical global view model mapping to parse, fuse, and filter the content data of CIM / E and QS files in the EMS system, achieving effective integration of these two heterogeneous data sets. It filters and compares power grid model data, real-time measurement data, and state estimation data from the EMS system, using them as dynamic model parameters and initial values for calculations in offline power system simulation software. The offline power grid simulation model constructed using this method not only retains the adjustment flexibility and rich functionality of offline calculations but also enhances the realism and real-time performance of the simulation model. This provides a solid technical foundation for power grid dispatchers to conduct power grid operation analysis and meets the needs of quasi-real-time power flow calculation and analysis of local power grids in actual power grid production and operation. Attached Figure Description
[0050] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a schematic diagram of the method for constructing an offline power grid simulation model based on an EMS system in this invention;
[0052] Figure 2 This is a schematic diagram of the hierarchical global view mapping mode;
[0053] Figure 3 This is a view of the structure of the pattern matching system. Detailed Implementation
[0054] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. It should be noted that similar reference numerals and letters in the following drawings indicate similar items; therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0055] The terms “comprising,” “including,” or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0056] The terms “first,” “second,” etc., are used only to distinguish one entity or operation from another, and should not be construed as indicating or implying relative importance, nor as requiring or implying any such actual relationship or order between these entities or operations.
[0057] Please refer to Figures 1-3 This invention provides a method for constructing an offline power grid simulation model based on an EMS system. The specific implementation process of this method is as follows:
[0058] Step 1: Obtain the near real-time CIM / E file and QS file to your local machine via the EMS system;
[0059] 1) Use a Shell script to read and upload the earliest CIM / E file and QS file from the EMS server to the FTP server every 15 minutes;
[0060] The storage paths for CIM / E and QS files in the EMS server are as follows:
[0061] Server name / home / d5000 / region name / data / xmldat;
[0062] Server name / home / d5000 / region name / data / e2tqxs;
[0063] 2) Download the latest CIM / E and QS files from the FTP server to the local machine every 15 minutes using a Shell script.
[0064] Step 2: Parse the data content of CIM / E files and QS files into intermediate data sources to form an intermediate view mode;
[0065] 1) Map the "classes" in the CIM / E files and QS files to tables in the CIM database and QS database, respectively;
[0066] This includes at least the following tables: area table, plant table, busbar table, transformer table, generator table, load table, capacitor table, reactor table, AC line table, and DC line table.
[0067] 2) Map the "attributes" in the CIM / E file and QS file to columns in the CIM database table and QS database table, respectively;
[0068] The plant / station table must include at least the plant / station name, unique identifier, area identifier, and highest voltage level; the busbar table must include at least the busbar name, unique identifier, plant / station identifier, and voltage level; the transformer table and generator table mapped from the QS file must include at least the component unique identifier, the plant / station identifier, winding type, voltage level, equivalent impedance, and equivalent admittance; and the capacitor table, reactor table, AC line table, and DC line table must include at least the component unique identifier, the plant / station identifier, voltage level, equivalent impedance, and equivalent admittance.
[0069] 3) Map the "related attributes" in the CIM / E file and QS file to foreign keys in the relevant columns respectively;
[0070] 4) Using the regional tables in the CIM / E database and QS database as intermediate data sources, and the substations, busbars, transformers, generators, loads, capacitors, reactors, AC lines, and DC lines as underlying data sources, map them to the intermediate data sources to form an intermediate view:
[0071] Area_CIM / E(Substation,Busbar,Transformer,Generator,Measure,Capacitor,Reactor,AC_Line_Segment,DC_Line_Segment);
[0072] Area_QS(Sub,Bus,Trans,Gen,Load,Compenstor_P,Compenstor_S,AC_Line,DC_Line).
[0073] Step 3: Merge intermediate data sources by establishing a pattern matching system to form a global view;
[0074] 1) Establish a pattern matching system, including a matching module (matcher), a combining module (combiner), and a selection module (selecter), as detailed below:
[0075] 1. Matching Module: Matches Area_CIM / E and Area_QS, using algorithms such as Euclidean distance, Jaccard similarity, cosine similarity, and Pearson similarity to calculate the similarity for each underlying data source, outputting multiple similarity matrices:
[0076] 2. Combination Module: Combines the multiple similarity matrices output by the matching module into one, and calculates the similarity score between two elements using the following formula:
[0077]
[0078] Where k is the number of matching modules, and matcherscore(m,i,j) is the similarity score between si and tj output by the m-th matching module;
[0079] 3. Selection Module: A threshold method is used to select data sources. All bottom data sources under all intermediate views with similarity scores greater than a given threshold can be used as global view content to be merged and fed back.
[0080] 2) Based on the pattern matching system in Area_CIM / E and Area_QS Select the appropriate intermediate data sources to merge, thereby forming a global view:
[0081] Area(Substation,Bus,Trans,Gen,Measure,Compenstor_P,Compenstor_S,ACLine,DCLine).
[0082] Step 4: Use the intermediary mode to query and filter the power grid data files for the target area;
[0083] 1) Convert the global view data source into an XML Schema to form a schema mapping M1 from the intermediate data source to the global view.
[0084] 2) Match the plants and equipment in the region to form a pattern mapping M2 from the data source to the intermediate data source;
[0085] 3) In the global view, XQuery is used to query the target area in the intermediary mode. The connection is established between the intermediate data source and the underlying data source through mapping M1, and the connection is established between the underlying data source and the intermediate data source in a hierarchical manner to obtain the power grid data file of the target area.
[0086] The Datalog language of XQuery is: Q(i): -P1(j1), ..., Pn(jn), where Q represents the query result, P1, ..., Pn points to XML Schema spatial data elements, P1(j1), ..., Pn(jn) are subqueries, and tuples i, j1, ..., jn are variables. The query is now complete.
[0087] Step 5: Perform boundary equivalence on the target area power grid data file to pass topology verification and power balance verification;
[0088] 1) Perform corresponding equivalent processing on the target area power grid boundary according to four different situations: If the target area power grid is the entire network under the current EMS system, no further boundary equivalence is required; if the target area power grid boundary interface is a transformer and it is connected to a higher voltage level power grid, then the high-voltage side of the transformer is equivalent to a generator, and the initial power is the real-time measured value of the high-voltage side of the transformer; if the target area power grid boundary interface is a transformer and it is connected to a lower voltage level power grid, then the low-voltage side of the transformer is equivalent to a load, and the initial power is the real-time measured value of the low-voltage side of the transformer; if the target area power grid boundary interface is a tie line, then the opposite side of the tie line is equivalent to a load, and the initial power is the real-time measured value of the power flow on the opposite side of the tie line.
[0089] 2) Perform topology verification on the target area power grid data file after boundary equivalence is completed. Use the electrical island identification program to verify the connectivity of all nodes in the target area power grid data file. If all nodes in the target area power grid data file are interconnected, the topology verification is passed; otherwise, remove the corresponding redundant nodes or correct the corresponding unconnected nodes.
[0090] 3) For the target area power grid data file that passes the topology verification, the node power balance is verified using real-time measurement data in the CIM / E file. The node injected power error coefficient δ is set. If the injected power of any node is less than the error coefficient, the verification is passed; otherwise, the state estimation data in the QS file is used for nodes that fail the verification.
[0091] Step 6: Map according to the target software format, import into the power system analysis software, and generate an offline power grid analysis model.
[0092] 1) Import the target area power grid data file that has passed topology verification and power balance verification into an xls format file to form a set of power grid nodes;
[0093] 2) Modify the column names of the xls format file according to the requirements of different power system analysis software. Power system analysis software that supports xls import includes BPA, PSASP, Matpower, Pypower, etc.
[0094] 3) Depending on the actual situation, choose to import all new projects or incrementally import existing projects, and import them through the UPI interface programs of each software.
[0095] 4) For components that exist in the target area's power grid data file but are not matched with the power system analysis software, a simulation model is generated using typical settings.
[0096] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for constructing an offline simulation model of a power grid based on an EMS system, characterized in that, The method specifically includes the following steps: Step 1: Obtain the CIM / E file and QS file generated by the EMS system in near real-time; Step 2: Parse the data content of CIM / E files and QS files into intermediate data sources to form an intermediate view mode; Step 3: Merge intermediate data sources by establishing a pattern matching system to form a global view; Step 4: Use the intermediary mode to query and filter the power grid data files for the target area; Step 5: Perform boundary equivalence on the target area power grid data file to pass topology verification and power balance verification; Step 6: Map according to the target software format, import the power system analysis software interface program, and generate an offline power grid analysis model; Step 1 includes the following specific steps for obtaining the CIM / E and QS files generated by the EMS system in near real-time: 1) Use a shell script to read and upload the earliest CIM / E file and QS file from the EMS server to the FTP server every 15 minutes; 2) Use a shell script to download the latest CIM / E and QS files from the FTP server to your local machine every 15 minutes; The specific steps in step 4 include: 1) Convert the global view data source into an XML Schema to form a schema mapping M1 from the intermediate data source to the global view. 2) Match the plants and equipment in the region to form a pattern mapping M2 from the data source to the intermediate data source; 3) In the global view, XQuery is used to query the target area in the intermediary mode. The connection is established between the intermediate data source and the underlying data source through mapping M1, and the connection is established between the underlying data source and the intermediate data source in a hierarchical manner to obtain the power grid data file of the target area. The Datalog language of XQuery is: Q(i): - P1(j1), ..., Pn(jn), where Q represents the query result, P1, ..., Pn points to XML Schema space data elements, P1(j1), ..., Pn(jn) is a subquery, and tuples i, j1, ..., jn are variables. If i⊆j1∪...∪jn, then the query is complete.
2. The method for constructing an offline power grid simulation model based on an EMS system according to claim 1, characterized in that, The specific steps in step 2 include: 1) Map the "classes" in the CIM / E file and QS file to tables in the CIM database and QS database, respectively; 2) Map the "attributes" in the CIM / E file and QS file to columns in the CIM database table and QS database table, respectively; 3) Map the "related attributes" in the CIM / E file and QS file to foreign keys in the relevant columns respectively; 4) Using the regional tables in the CIM / E database and QS database as intermediate data sources, and the substations, busbars, transformers, generators, loads, capacitors, reactors, AC lines, and DC lines as underlying data sources, map them to the intermediate data sources to form an intermediate view: Area_CIM / E(Substation, Busbar, Transformer, Generator, Measure, Capacitor, Reactor, AC_Line_Segment, DC_Line_Segment); Area_QS(Sub, Bus, Trans, Gen, Load, Compenstor_P, Compenstor_S, AC_Line,DC_Line).
3. The method for constructing an offline power grid simulation model based on an EMS system according to claim 1, characterized in that, The specific steps in step 3 include: 1) Establish a pattern matching system, including a matching module, a combination module, and a selection module. Specific components include: Matching module: Matches Area_CIM / E and Area_QS, using Euclidean distance, Jaccard similarity, cosine similarity, and Pearson similarity algorithms to calculate the similarity for each underlying data source, outputting multiple similarity matrices: Combination Module: Combines the multiple similarity matrices output by the matching module into one, and calculates the similarity score between two elements using the following formula: , Where k The similarity score between si and tj output by the m-th matching module; Selection module: The threshold method is used to select the data source. The bottom data source under all intermediate views with similarity scores greater than a given threshold is used as the global view to merge the content feedback. 2) Merge the two types of intermediate data sources, select the appropriate intermediate data source according to the pattern matching system, and form a global view: Area(Substation, Bus, Trans, Gen, Measure, Compenstor_P, Compenstor_S,ACLine, DCLine).
4. The method for constructing an offline power grid simulation model based on an EMS system according to claim 1, characterized in that, The specific steps in step 5 include: 1) Perform corresponding equivalent processing on the power grid boundary of the target area according to four different situations: If the target area power grid is the entire network under the current EMS system, then no further boundary equivalence is required; If the target area's power grid boundary interface is a transformer and it is connected to a higher voltage level power grid, then the high-voltage side of the transformer is equivalent to a generator, and the initial power is the real-time measured value of the power supplied to the grid from the high-voltage side of the transformer. If the target area's power grid boundary interface is a transformer and it is connected to a lower voltage level power grid, then the low-voltage side of the transformer is considered as a load, and the initial power is the real-time measured value of the power supplied to the grid from the low-voltage side of the transformer. If the grid boundary interface of the target area is a tie line, then the opposite side of the tie line is considered as the load, and the initial power is the real-time power flow measurement value on the opposite side of the tie line. 2) Perform topology verification on the target area power grid data file after boundary equivalence is completed. Use the electrical island identification program to verify the connectivity of all nodes in the target area power grid data file. If all nodes in the target area power grid data file are interconnected, the topology verification is passed; otherwise, remove the corresponding redundant nodes or correct the corresponding unconnected nodes. 3) For the target area power grid data file that passes the topology verification, the node power balance is verified using real-time measurement data in the CIM / E file. A node power error coefficient δ is set. If the injected power of any node is less than the error coefficient, the verification is passed; otherwise, the state estimation data in the QS file is used for nodes that fail the verification.