Production simulation mode cut-through electric quantity comparison and statistics method based on asymmetric mapping
Through asymmetric mapping method, a quick access table is constructed, which solves the problem of low data processing efficiency when the production analog output power parameters are injected into the power grid, and efficient current calculation and power comparison statistics are realized, supporting the fine impact of the power grid on new energy. .
Patent Information
- Application Number
- CN202411271112.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-02-18
AI Technical Summary
When the existing technology injects the power parameters of the production analog output into the power grid, the data processing efficiency is extremely low, making it difficult to meet the massive data processing needs of large-scale power grids, and it is impossible to efficiently carry out the refinement of the impact of new energy randomness and volatility on the operation of the power grid. analyze.
Using asymmetric mapping method, a structured analytical dictionary and non-structural analytical dictionary are constructed to form a fast access table with a hash structure to achieve rapid matching and injection of power parameters, and then determine whether to inject the power grid method in a production simulation.
It improves data processing efficiency, can efficiently carry out trend calculations and power comparison statistics, and promotes the power grid to consider the impact of large-scale access to new energy.
Smart Images

Figure CN119475654A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid simulation, and more specifically, to a production simulation method based on asymmetric mapping and a through-flow electricity quantity comparison and statistics method. Background Art
[0002] After the large-scale access of renewable energy to the grid, the randomness and volatility of renewable energy output on the grid can be simulated to a certain extent through the power generation simulation system. Its role is reflected in the hourly output table throughout the year. These include the regional startup distribution of renewable energy output, which has a great impact on the grid load size and voltage distribution. It is necessary to inject the load distribution and startup ratio of the power generation simulation output into the grid mode, perform power flow calculation and convergence evaluation, and promote the grid mode to more widely consider the impact of large-scale access of renewable energy.
[0003] Since the production simulation power output adopts a tabular data structure, and the power grid flow method adopts a hash-free ASCII data structure, the node power output of the power generation production simulation is injected into the power grid method. If the traditional one-to-one comparison and cyclic update mode is adopted, the data processing efficiency is extremely low in the case of tens of thousands of nodes in the current power grid. It is difficult to meet the massive state of the power generation production simulation system after hourly output, implement efficient power flow calculations, and cannot efficiently carry out detailed analysis of the impact of the randomness and volatility of new energy on power grid operation. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a method for comparing and counting the electricity volume in a production simulation mode based on asymmetric mapping.
[0005] According to one aspect of the present invention, a method for comparing and counting the amount of electricity in a production simulation mode based on asymmetric mapping is provided, comprising:
[0006] According to the output information of the power grid's production simulation power generation load nodes, a structured parsing dictionary for production simulation is constructed;
[0007] Based on the structured parsing dictionary, a production simulation quick access table with a hash structure is formed for the determinant data of the power generation load table of the production simulation, with the power grid bus node ID as the key and the combination of electrical quantities as the value;
[0008] Based on the information features of the power grid model constructed by the power system simulation protocol of the power grid mode, a non-structured parsing dictionary that distinguishes electricity statistics is constructed;
[0009] Based on the unstructured parsing dictionary, the device range is first locked based on the device type in the power grid memory, and then the power grid bus node ID key is matched to form a power grid quick access table;
[0010] According to the production simulation quick access table and the power grid mode mapping set table, determine whether to inject the power grid mode in the production simulation mode.
[0011] Optionally, a structured parsing dictionary is constructed based on the output information of the power grid's production simulation power generation load node, including:
[0012] According to the power grid production simulation output, the power generation and load are characterized by the corresponding parameters of the bus nodes, and a structured parsing dictionary of row records is constructed, wherein the field column headers of the structured parsing dictionary include partition, bus name, reference voltage, node load, and node power generation.
[0013] Optionally, the grid bus node ID is composed of a partition, a bus name, and a reference voltage, and
[0014] The principles followed in forming the power grid bus node ID include: the requirements of the power system simulation data protocol, the requirements of the power system simulation data protocol for the bus name, and the requirements of the power system simulation data protocol for the bus reference voltage.
[0015] Optionally, based on the structured parsing dictionary, for the determinant data of the power generation load table of the production simulation, a production simulation quick access table with a hash structure having the power grid bus node ID as the key and the combination of electrical quantities as the value is formed, including:
[0016] Read the output of the production simulation data once, parse a single output data row according to the structured parsing dictionary, and select the partition, bus name and reference voltage field values to form the power grid bus node ID;
[0017] Collect the load and power generation field values of the production simulation and add the separator and the grid bus node ID to form a mapping pair value;
[0018] The grid bus node ID and the mapping pair values are stored in a hash mapping queue to form a production simulation quick access table.
[0019] Optionally, based on the unstructured parsing dictionary, a broad search is first performed based on the device type in the memory of the power grid mode to lock the device range, and then the power grid bus node ID key is matched to form a power grid mode quick access table, including:
[0020] Establish a data line scan filter in the memory, read the power grid mode file line by line to conduct a breadth search to lock the device range;
[0021] The grid bus node ID key is matched according to the locked device range to form a grid mode quick access table.
[0022] Optionally, determining whether to inject the grid mode in a production simulation manner according to the production simulation quick access table and the grid mode mapping set table includes:
[0023] Extract the load and power generation in the production simulation quick access table and the power grid mode mapping set table, and calculate the sum of the first load and the first power generation under the production simulation, and the sum of the second load and the second power generation under the power grid mode;
[0024] Subtracting the sum of the first load amounts from the sum of the first power generation amounts to determine a first amount difference under production simulation;
[0025] Subtracting the sum of the second load amount from the sum of the second power generation amount to determine a second amount difference in a power grid mode;
[0026] The first quantity difference is taken as the difference from the second quantity difference and the absolute value is taken to determine the cross-section power exchange quantity difference under the production simulation and the power grid mode;
[0027] The power exchange amount difference of the section is compared with the preset threshold value, and it is determined whether to inject the power into the grid in a production simulation manner according to the comparison result.
[0028] Optionally, determining whether to inject the power grid in a production simulation manner according to the comparison result includes:
[0029] When the cross-section power exchange amount difference is not greater than a preset threshold, it is determined to inject the power into the grid in a production simulation manner; otherwise, the production simulation injection into the grid manner is abandoned.
[0030] According to another aspect of the present invention, a production simulation method based on asymmetric mapping through-flow electricity comparison and statistics system is provided, comprising:
[0031] The first construction module is used to construct a structured parsing dictionary for production simulation according to the output information of the power grid's production simulation power generation load node;
[0032] The first forming module is used to form a production simulation quick access table with a hash structure using the power grid bus node ID as a key and the combination of electrical quantities as a value for the determinant data of the power generation load table of the production simulation based on the structured parsing dictionary;
[0033] The second construction module is used to construct a non-structured parsing dictionary for distinguishing electricity statistics according to information features of the power grid model constructed by the power system simulation protocol of the power grid mode;
[0034] The second forming module is used to first perform a breadth search based on the device type in the memory of the power grid mode to lock the device range based on the unstructured parsing dictionary, and then match the power grid bus node ID key to form a power grid mode quick access table;
[0035] The determination module is used to determine whether to inject the power grid mode in the production simulation mode according to the production simulation quick access table and the power grid mode mapping set table.
[0036] Therefore, the present invention provides a method for comparing and counting the electricity volume in a production simulation mode based on asymmetric mapping. In view of the problem that the load and power generation data output by the production simulation is injected into the power grid, the data structure is complex, the processing efficiency is low, and there is a lack of prejudgment to carry out the feasibility of power flow calculation, it is proposed to establish a similar hash memory mapping queue for the asymmetric data structure of different data sources, design the busbar equipment ID and the power grid multi-value to be combined into a string to form a key-value pair and store it in the mapping queue, and further implement the mapping queue classification traversal according to the data source to obtain the load and power generation difference, and according to the number of elements in the mapping queue and the power difference, quickly identify the feasibility of the production simulation injection into the power grid to carry out the power flow calculation. This embodiment proposes a method for identifying the device type by the first character of the network data in the power grid mode, a method for standardizing the device ID, and a memory hash table mapping storage mechanism, all of which have general significance. When applied to other application scenarios of power grid simulation such as screening, positioning, and maintenance functions, they still have the function of speeding up and increasing efficiency. The method principle described in this preferred embodiment solves the problem of pre-prepared rapid prejudgment of the production simulation penetration mode, and has high practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:
[0038] Figure 1 It is a flow chart of a method for comparing and counting the electricity consumption in a production simulation mode based on asymmetric mapping provided by an exemplary embodiment of the present invention;
[0039] Figure 2 It is a schematic diagram of a load and power generation tabular data structure for a production simulation output provided by an exemplary embodiment of the present invention;
[0040] Figure 3 It is a schematic diagram of a data structure of a hash parameter field of a bus device for characterizing a power grid mode provided by an exemplary embodiment of the present invention;
[0041] Figure 4 It is a schematic diagram of a network parameter data structure freely composed of devices as units in a power grid mode provided by an exemplary embodiment of the present invention;
[0042] Figure 5 It is a schematic diagram of comparative statistics and application principle of the electricity consumption in a production simulation mode provided by an exemplary embodiment of the present invention;
[0043] Figure 6 It is a schematic diagram of an asymmetric mapping relationship between a bus device and a property parameter characterized by a production simulation output bus device and a power grid mode provided by an exemplary embodiment of the present invention;
[0044] Figure 7It is a structural diagram of a system for comparing and counting electricity through a production simulation method based on asymmetric mapping provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0045] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described here.
[0046] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0047] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0048] It should also be understood that, in the embodiments of the present invention, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0049] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0050] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.
[0051] It should also be understood that the description of the various embodiments of the present invention focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0052] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0053] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0054] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0055] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0056] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0057] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0058] Exemplary Methods
[0059] Figure 1 1 is a flow chart of a method for comparing and counting the amount of electricity in a production simulation mode based on asymmetric mapping provided by an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as Figure 1 As shown, the production simulation method based on asymmetric mapping through-flow electricity comparison and statistics method 100 includes the following steps:
[0060] Step 101, constructing a structured parsing dictionary for production simulation according to the output information of the power grid's production simulation power generation load node;
[0061] Step 102, based on the structured parsing dictionary, for the determinant data of the power generation load table of the production simulation, a production simulation quick access table with a hash structure using the power grid bus node ID as a key and a combination of electrical quantities as a value is formed;
[0062] Step 103, constructing a non-structured parsing dictionary for distinguishing electricity statistics according to information features of a power grid model constructed by a power grid-based power system simulation protocol;
[0063] Step 104, based on the unstructured parsing dictionary, first perform a breadth search based on the device type in the memory of the power grid mode to lock the device range, and then match the power grid bus node ID key to form a power grid mode quick access table;
[0064] Step 105 , determining whether to inject the grid mode in a production simulation manner according to the production simulation quick access table and the grid mode mapping set table.
[0065] Specifically, in order to solve the problems of injecting the power parameters of the production simulation output into the power grid in the prior art, low data efficiency, lack of feasibility of pre-judgment and power flow calculation, etc., the present invention provides a production simulation method based on asymmetric mapping to compare and count the power. The specific steps are as follows:
[0066] In step 101, according to the production simulation power generation load {B i}Node output information and build a structured parsing dictionary to distinguish power statistics.
[0067] Preferably, the simulated power generation load {B i}Node output information, build a structured parsing dictionary to distinguish power statistics, including:
[0068] The power generation and load output by the production simulation are characterized by the corresponding parameter quantity of the bus node, and the bus node is included in one or more power grid partitions to form a power statistics object set {B i}, where B i is the i-th generation and / or load result, 1≤i≤N, N is the number of partitions of the bus node.
[0069] Figure 2 The data structure of the power generation load output at a single moment is represented in the table, which consists of a standardized row and column format. The first row is the field column header, including the partition, bus name, reference voltage, node load, and node power generation. When there is only load or power generation on the node, the other parameter value is 0, thereby ensuring the consistency of the data structure. The bus node is a logical device that can correspond to one or more physical devices. For example, a bus node contains multiple generators. The table column header and record row, different fields and values are separated by commas. To read this type of data, you need to build a row record structure dictionary:
[0070] struct{
[0071] TCHAR cZone[2]; / / partition character
[0072] CString sBusName; / / bus name
[0073] FLOAT fBaseVolt; / / Base voltage
[0074] FLOAT fLoad; / / load
[0075] FLOAT fGenerator; / / Generate electricity
[0076] }
[0077] The structure expresses the structural characteristics of a class of data rows. A single structure records the valid information of a row of data in the memory. Multiple record rows are generally recorded in a structure array or list. The present invention adopts a more efficient key-value hash structure in the memory, so the current structure is only used to identify the parameter information of a single row. After each parameter is identified, it is transferred to the key-value mapping list of the memory after processing.
[0078] In step 102, the structure dictionary in step 101 is applied to form a hash structure quick access table in memory with the grid bus node ID as the key and the combination of electrical quantities as the value for the production simulation power generation load table determinant data.
[0079] Preferably, for the production of simulated power generation load tabular data, a hash structure quick access table is formed in the memory with the power grid bus node ID as the key and the combination of electrical quantities as the value, including:
[0080] In order to realize the production simulation output power injection into the power grid, it is necessary to make the sources different but point to the same device to achieve unified identification. Since the power grid equipment in different regions may have the same name, it is difficult to ensure the uniqueness of the device only by the device name. Therefore, it is necessary to use a composite field to form the device ID to identify the uniqueness of the device. Specifically, the formation of the busbar device ID follows the following principles:
[0081] 1. Three fields are arranged in sequence to form the ID of a single device. They are partition, bus name and reference voltage. The order of the three is fixed, and the fields are separated by invisible vertical separators. Even if the field is empty, its separator must be complete, so the device ID contains 2 invisible separators.
[0082] 2. In accordance with the requirements of the PSD data protocol, the partition character cannot exceed 2 characters at most and can be empty or a single character. Since the data output by the production simulation is structured tabular data, the spaces before and after the power grid partition character must be removed when forming the ID. The partition as a whole can be empty, and all buses with empty partitions belong to the default partition. When a partition has only one non-empty character, the other character is empty. Regardless of the position before or after the character, it points to the single-character partition. In other words, a space cannot be used as an effective collocation symbol for a single non-empty power grid partition character.
[0083] 3. Follow the PSD data protocol requirements for bus names. The bus name can be up to 8 strings, and at least 1 visible non-blank character is required. The values or marks in the bus name are treated as characters. When there are spaces before and / or after the bus name, the spaces before and after the bus name should be removed when forming the bus ID.
[0084] 4. Comply with the requirements of the PSD data protocol for the bus reference voltage. The reference voltage is a floating point number type. Considering the voltage levels in the power grid, the number of digits generally does not exceed 4. In the process of forming the bus ID, the expression of the number must be standardized. The standard content includes removing the leading space 0 when the voltage is less than 1, and removing one or more consecutive 0s at the end of the decimal point of the reference voltage, even if the number expressed is meaningless.
[0085] Each bus device ID will exist as a key of a mapping pair in memory, and the value of the mapping pair points to the load and power generation. The two parameters are represented by a string in memory, and the parameters are separated by invisible vertical separators. When performing power statistics, the entire string is decomposed into multiple columns in memory using separators. Here, the first column points to the load and the second column points to the power generation. When performing statistical calculations, the character to floating point interface is used to convert it into a floating point number.
[0086] In this preferred embodiment, the power generation load data output by the production simulation is saved in the memory using a character mapping queue. The queue adopts a hash structure, which ensures the rapidity of the query. Specifically, the production simulation data output is read once, and a data transfer scanning function block is constructed. The row record structure dictionary format is first used to parse a single output data row, and the partition, bus name and reference voltage field values are selected to form the bus equipment ID item. The load and power generation field values are collected and the values of the mapping pair are added with separators. The two are stored in the hash mapping queue accordingly to realize the dumping of the file to the memory. All meaningful equipment and parameter information is recorded in the memory. The first row of the file is the comment row of the column header field. Because the definition of the ID key and the power value is self-explanatory, there is no need to open up variables for storage. Since the production simulation output usually contains multiple bus output rows, all bus rows must be traversed during a reading process to ensure the integrity of the data.
[0087] In practical applications, it is very important to strictly abide by the above 4 principles to generate the ID of the busbar equipment. It marks the uniqueness of the equipment and is closely related to the equipment search and positioning in the subsequent power grid mode. When the same simulation logic device is named inconsistently in different data, or the processing principles for generating IDs are inconsistent when the names are the same, it is impossible to perform effective power statistics, let alone conduct correct power qualification inspections. It will also be meaningless to generate new power grid modes based on production simulation outputs.
[0088] In step 103, a non-structural parsing dictionary for distinguishing electricity statistics is constructed based on the information features of the power grid {Bl, Lj, Tk} model constructed by the PSD protocol. PSD is a power system simulation software that records model parameters in the form of data cards. The parameter fields of each model are different. {Bl, Lj, Tk} is the basic feature of the PSD simulation software device management. B (Bus) refers to busbar equipment, L (Line) refers to line equipment, and T (Transformer) refers to transformers, which are the basic equipment types for building power grid simulation.
[0089] Preferably, the power grid {Bl, Lj, Tk} model information features constructed for the PSD protocol, and the construction of a non-structural parsing dictionary for distinguishing electricity statistics, include:
[0090] The power grid constructed according to the PSD protocol l ,L j ,T k}Model information characteristics, the network data in the power grid mode generally adopts an unstructured free organization structure, which is used to characterize the bus, line, and transformer equipment collection. The present invention only involves the bus equipment {B l}, where B l It is the lth bus device, 1≤l≤L. Considering the way of injecting the production simulation output into the grid, its bus node must be included in the network constructed by the grid method, so there is N≤L.
[0091] Figure 3 It is a hash parameter field data structure associated with the bus. This is a parsing structure for a single bus parameter. Each bus parameter corresponds to an instance of the data structure. Multiple bus parameters are located and parsed using an instance table formed by the parsing structure. In addition to active load and active power generation, it also includes reactive load, parallel reactance and capacitance, and other parameter information. Since the field pointed to by the bus is related to the data column position and there is no interval control between the fields, when reading the bus data in the power grid mode, the column fields must be parsed first. The field auxiliary definition class structure dictionary is used for specific implementation:
[0092] struct{
[0093] INT nStart; / / field starting column position
[0094] INT nEnd; / / Field end column position
[0095] CString sFmt; / / Field type
[0096] CString sCaption; / / Field title
[0097] CString sDefaultValue; / / Field default value
[0098] }
[0099] The field type in the above structure indicates the working type of the parameter field, such as integer, floating point, character, and the bit length and decimal point length can also be specified for the floating point type. The device name and each parameter of the device correspond to a structure object. Considering the needs of the present invention, at least 6 structures, namely the bus device classification identifier, bus device name, bus node reference voltage, bus device partition identifier, bus node active load and bus node active power generation, are required to correctly record the bus that needs to count the amount of electricity. Specifically for the device classification identifier, its dictionary entity object value is {1, 2, A2, device name, B}. When a row of data is obtained from the power grid mode, the row must first be decomposed into specific field values according to the auxiliary defined structure configuration, and then recorded in the memory.
[0100] In step 104, for the PSD power grid mode hash free format data, a broad search is first performed in the memory based on the device type to lock the device range, and then the bus node ID key is matched to form a mode mapping set table. 104 depends on the instance of the parsing structure defined in 103 for decomposition, and after decomposition, a quick access table is established for the parameters used therein.
[0101] Preferably, the method of hashing free format data for the PSD power grid mode, firstly performing a breadth search based on the device type in the memory to lock the device range, and then matching the bus node ID key to form a mapping set table, includes:
[0102] PSD power grid simulation flow data is a multi-type information set containing mode naming, calculation output control, algorithm selection, network model parameters, custom parameter revision and statistical analysis. When the production simulation output is injected into the power grid mode, only the bus equipment related information of the network model parameters will be changed. Extracting the required bus equipment from multi-type mixed flow data files is achieved by establishing a big data line scanning and filtering mechanism. The specific implementation steps are:
[0103] Reference Figure 4 In the example, in the network model data arrangement, even if the column fields have strict field meaning definitions from a single row, there are no strict restrictions on the arrangement of data between rows, but rather a greater degree of freedom. When modeling power flow, you can first define the bus parameter row, then the line parameter row, and then the transformer parameter row; you can also define all bus row parameters, then all line rows and transformer parameter rows, and so on. Therefore, to extract the required bus device ID, you need to search, locate and filter all network data.
[0104] A data row scanning filter is established in the memory. After successfully opening the power grid mode file, the first row of data is read. When a comment or a pure blank row is encountered, the next row of data is directly jumped to. After determining that it is a valid data row, the network data block mark is first searched. The network data block mark is / NETWORK_DATA\. Once the mark is found, a variable bNetworkData with a logical true value is set. After entering the reading of the next data row, if bNetworkData is found to be true, the device type screening process for the data row is directly entered.
[0105] In the equipment type screening block, basic eligibility checks are performed on the incoming data rows, such as removing the first and last empty characters, determining whether it is a comment line, whether it is empty, and after confirming that the data is valid, the first character is checked for equipment type. According to the PSD power grid simulation network data description characteristics, the valid power grid equipment describes its equipment type through the first character. For example, B identifies the device as a busbar device, L is a line device (E is an asymmetric line), and T is a transformer device. Considering that the invention only involves busbar equipment, only one character needs to be judged to exclude non-busbar equipment, thereby greatly improving the efficiency of equipment detection.
[0106] When encountering a data row with the first character B, refer to the bus field auxiliary definition class structure dictionary to extract the fields of the data row in meaningful segments. It is not necessary to parse all the fields during extraction. Only the six fields of bus device name, reference voltage, partition identifier, node active load, and node power generation need to be extracted. Referring to the device ID synthesis principle proposed in step 102, the field values of bus partition, name, and reference voltage are standardized. Standardized field values are crucial to ensure the uniqueness and correspondence of the equipment. The standardization of the three field values in the bus device ID must be consistent with step 102.
[0107] When a busbar device ID is formed, it is immediately compared with the busbar device ID mapping queue element of the power generation simulation output. The Lookup function of the mapping queue is directly used to quickly find out whether the current busbar device exists. If it exists, the node active load and node power generation value are extracted from the incoming data row. The two parameter values are merged together and represented by a string in the memory. The two values are separated by an invisible vertical separator. After this operation, a set of busbar device key and value corresponding variables existing in the production simulation output bus are formed. Similar to step 102, a new hash structure mapping column is also established in the memory to store the corresponding busbar devices extracted from the power grid network parameters.
[0108] Repeat the above process until the last row of data of the grid mode network parameters is processed, and all busbar devices related to power generation output in the entire grid are obtained. At this time, the number of elements of the two memory mapping queues with different sources must be judged. When the number of elements is not equal, it means that there is a difference between the two data sources, and the equipment in the production simulation has been changed or an error has occurred. It is meaningless to implement subsequent power statistics or even inject power into the grid mode to carry out power flow calculation and analysis. Once this happens, the whole process is terminated after giving the difference busbar information. When the two devices are completely corresponding, power statistics are then carried out.
[0109] In step 105, based on the load and power generation extracted from the dual data sources, the sum and difference are classified and counted, and the cross-sectional power exchange difference |ΔP is compared. (P) -ΔP (M) |, predict the impact of quantity difference on power flow calculation. Among them, steps 101 and 102 point to the file data of the production simulation output. Steps 103 and 104 point to the file data of the power grid mode. 103 defines the unstructured parsing dictionary, and 104 reads the power grid data and screens it to obtain the bus equipment corresponding to 102. Both aspects must form a quick access table in the memory. 101 and 102 read the output information of the production simulation, 103 and 104 read the same information of the corresponding bus node in the power grid mode, and 105 performs statistical calculation and analysis on the information of the two data sources.
[0110] Preferably, the method extracts the load and power generation from the dual data sources, classifies and counts the sum and difference, and compares the cross-sectional power exchange difference |ΔP (P) -ΔP (M) |, predict the impact of quantity difference on power flow calculation, including:
[0111] Figure 5 In the process, we first classify and count the electricity consumption of the production simulation, and establish a bus device mapping queue traversal mechanism for the output in the memory. Set two accumulation variables PPL and PPG. The former records the sum of the load on all buses in the queue, and the latter records the sum of the power generation on all buses in the queue. The initial value is set to 0. Start the loop from the first record in the queue, take each key value object, decompose the value string into fields, and take out the first field as the load value PPL i , convert it into a floating point number using the atof function and add it to the variable PPL; the second field is used as the power generation PPG i , and also use the atof function to convert it into a floating point number and add it to the variable PPG. The traversal process starts from 1 and needs to be looped N times, even if PPL i or PPG iIf the sum is 0, the accumulation operation is also performed. Considering that the values of these two types of variables are much smaller than the maximum representable value of floating-point numbers in the computer, MAXFLOAT, there is no need to consider the problem of variable out-of-bounds, nor to set the PPL and PPG variables to double floating-point numbers. After the traversal is completed, the difference between the two sum variables PPL and PPG is recorded in the variable DeltaPP.
[0112] refer to Figure 6 A schematic diagram of the asymmetric mapping relationship between the busbar equipment and the busbar equipment and attribute parameters represented by the power grid mode in the production simulation output is prepared. Then, the classified electricity statistics are carried out on the busbar list extracted by the power grid mode. As above, a queue traversal mechanism for the busbar equipment mapping in the power grid mode is established in the memory. Two cumulative variables PML and PMG are set. The former records the sum of the load on all buses in the queue, and the latter records the sum of the power generation on all buses in the queue. The initial value is set to 0. Start the loop from the first record in the queue, take each key-value object, decompose the value string into fields, and take out the first field as the load value PML. i , convert it into a floating point number using the atof function and add it to the variable PML; the second field is used as the power generation PMG i , and also use the atof function to convert it into a floating point number and add it to the variable PMG. The traversal process starts from 1 and needs to be looped N times, even if PML i or PMG i If the sum is 0, the accumulation operation is also performed. Considering that the values of these two types of variables are much smaller than the maximum representable floating point number in the computer, MAXFLOAT, there is no need to consider the problem of variable out-of-bounds, nor to set the PML and PMG variables to double floating point numbers. After the traversal is completed, the difference between the two sum variables PML and PMG is recorded in the variable DeltaPM.
[0113] Set a smaller threshold variable Lamada, for example 1, representing 1MW, and calculate the difference between the above two power statistics results DeltaPP and DeltaPM again and take the absolute value |DeltaPP-DeltaPM|. This value is compared with Lamada. If it is not greater than it, it means that after the production simulation, the output of power generation and load can maintain the exchange power between this area and the outside in the power grid mode basically unchanged, and can ensure the basic active power balance after the generation of the flow, and has the conditions to execute the production simulation load and power generation injection into the power grid mode and carry out flow calculation and analysis.
[0114] Therefore, the present invention provides a method for comparing and counting the electricity volume in a production simulation mode based on asymmetric mapping. In view of the problem that the load and power generation data output by the production simulation is injected into the power grid, the data structure is complex, the processing efficiency is low, and there is a lack of prejudgment to carry out the feasibility of power flow calculation, it is proposed to establish a similar hash memory mapping queue for the asymmetric data structure of different data sources, design the busbar equipment ID and the power grid multi-value to be combined into a string to form a key-value pair and store it in the mapping queue, and further implement the mapping queue classification traversal according to the data source to obtain the load and power generation difference, and according to the number of elements in the mapping queue and the power difference, quickly identify the feasibility of the production simulation injection into the power grid to carry out the power flow calculation. This embodiment proposes a method for identifying the device type by the first character of the network data in the power grid mode, a method for standardizing the device ID, and a memory hash table mapping storage mechanism, all of which have general significance. When applied to other application scenarios of power grid simulation such as screening, positioning, and maintenance functions, they still have the function of speeding up and increasing efficiency. The method principle described in this preferred embodiment solves the problem of pre-prepared rapid prejudgment of the production simulation penetration mode, and has high practicality.
[0115] Exemplary Systems
[0116] Figure 7 1 is a schematic diagram of a system for comparing and counting electricity through a production simulation method based on asymmetric mapping provided by an exemplary embodiment of the present invention. Figure 7 As shown, the system 700 includes:
[0117] The first construction module 710 is used to construct a structured parsing dictionary for production simulation according to the output information of the power grid's production simulation power generation load node;
[0118] The first forming module 720 is used to form a production simulation quick access table with a hash structure using the power grid bus node ID as a key and a combination of electrical quantities as a value for the determinant data of the power generation load table of the production simulation based on the structured parsing dictionary;
[0119] The second construction module 730 is used to construct a non-structured parsing dictionary for distinguishing electricity statistics according to the information characteristics of the power grid model constructed by the power grid mode power system simulation protocol;
[0120] The second forming module 740 is used to first perform a breadth search based on the device type in the memory of the power grid mode to lock the device range based on the unstructured parsing dictionary, and then match the power grid bus node ID key to form a power grid mode quick access table;
[0121] The determination module 750 is used to determine whether to inject the power grid mode in a production simulation mode according to the production simulation quick access table and the power grid mode mapping set table.
[0122] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for comparing and counting the electricity consumption in a production simulation mode based on asymmetric mapping, characterized in that: include: According to the output information of the power grid's production simulation power generation load nodes, a structured parsing dictionary for production simulation is constructed; Based on the structured parsing dictionary, a production simulation quick access table with a hash structure using the power grid bus node ID as a key and a combination of electrical quantities as a value is formed for the determinant data of the power generation load table of the production simulation; Based on the information features of the power grid model constructed by the power system simulation protocol of the power grid mode, a non-structured parsing dictionary that distinguishes electricity statistics is constructed; Based on the unstructured parsing dictionary, a broad search is first performed based on the device type in the memory of the power grid mode to lock the device range, and then the power grid bus node ID key is matched to form a power grid mode quick access table; According to the production simulation quick access table and the power grid mode mapping set table, it is determined whether to inject the power grid mode in the production simulation mode.
2. The method according to claim 1, characterized in that According to the output information of the power grid's production simulation power generation load node, a structured parsing dictionary is constructed, including: The power generation and load outputted by the production simulation of the power grid are characterized by the corresponding parameter quantities of the bus nodes, and a structured parsing dictionary of row records is constructed, wherein the field column headers of the structured parsing dictionary include partition, bus name, reference voltage, node load, and node power generation.
3. The method according to claim 2, characterized in that The grid bus node ID is composed of the partition, the bus name and the reference voltage, and The grid bus node ID is formed in accordance with the following principles: power system simulation data protocol requirements, power system simulation data protocol requirements for bus names, and power system simulation data protocol requirements for bus reference voltages.
4. The method according to claim 1, characterized in that: Based on the structured parsing dictionary, for the determinant data of the power generation load table of the production simulation, a production simulation quick access table with a hash structure using the power grid bus node ID as the key and the combination of electrical quantities as the value is formed, including: Read the output of the primary production simulation data, parse a single output data row according to the structured parsing dictionary, and select the partition, bus name and reference voltage field values therefrom to form the power grid bus node ID; Collect the load and power generation field values of the production simulation and add the separator and the grid bus node ID to form a mapping pair value; The power grid bus node ID and the mapping pair value are stored in a hash mapping queue to form the production simulation quick access table.
5. The method according to claim 1, characterized in that Based on the unstructured parsing dictionary, a broad search is first performed based on the device type in the memory of the power grid mode to lock the device range, and then the power grid bus node ID key is matched to form a power grid mode quick access table, including: Establish a data line scan filter in the memory, read the power grid mode file line by line to conduct a breadth search to lock the device range; The power grid bus node ID key is matched according to the locked device range to form the power grid mode quick access table.
6. The method according to claim 1, characterized in that Determining whether to inject the power grid mode in the production simulation mode according to the production simulation quick access table and the power grid mode mapping set table includes: Extract the load and power generation in the production simulation quick access table and the grid mode mapping set table, and count the sum of the first load and the first power generation under the production simulation, and the sum of the second load and the second power generation under the grid mode; Subtracting the sum of the first load amounts from the sum of the first power generation amounts to determine a first amount difference under the production simulation; Subtracting the sum of the second load amounts from the sum of the second power generation amounts to determine a second amount difference under the power grid mode; Taking the absolute value of the difference between the first quantity difference and the second quantity difference, determining the cross-section power exchange quantity difference under the production simulation and the power grid mode; The cross-section power exchange amount difference is compared with a preset threshold value, and it is determined whether to inject the power grid mode in the production simulation mode according to the comparison result.
7. The method according to claim 6, characterized in that Determining whether to inject the power grid mode in the production simulation mode according to the comparison result includes: In the case where the cross-section power exchange amount difference is not greater than the preset threshold, it is determined to inject the production simulation method into the power grid mode; otherwise, the injection of the production simulation method into the power grid mode is abandoned.
8. A production simulation method based on asymmetric mapping and a comparative statistical system for electricity consumption, characterized in that: include: The first construction module is used to construct a structured parsing dictionary for production simulation according to the output information of the power grid's production simulation power generation load node; The first forming module is used to form a production simulation quick access table with a hash structure using the power grid bus node ID as a key and a combination of electrical quantities as a value for the determinant data of the power generation load table of the production simulation based on the structured parsing dictionary; The second construction module is used to construct a non-structured parsing dictionary for distinguishing electricity statistics according to information features of the power grid model constructed by the power system simulation protocol of the power grid mode; The second forming module is used to first perform a breadth search based on the device type in the memory of the power grid mode to lock the device range based on the unstructured parsing dictionary, and then match the power grid bus node ID key to form a power grid mode quick access table; A determination module is used to determine whether to inject the power grid mode in the production simulation mode according to the production simulation quick access table and the power grid mode mapping set table.