Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the detailed description is presented by way of example only and is not intended to limit the scope of the invention.
Fig. 1 is a schematic flow chart of an embodiment of a power distribution network drawing modeling method of the present invention. As shown in fig. 1, the power distribution network drawing modeling method in the present embodiment includes,
step S101: constructing a model database of the equipment by using an object-oriented modeling mode;
step S103: drawing an electrical wiring diagram according to the description of the wiring mode of the equipment;
step S105: carrying out pattern matching association on the electrical wiring diagram and the model database;
step S107: obtaining node number information of the equipment model according to the electric wiring diagram and the diagram model matching correlation result;
step S109: and updating the model database according to the graph model matching association result and the node number information.
According to the power distribution network drawing modeling method, the model database of the equipment is built by utilizing the object-oriented modeling mode, the electrical wiring diagram is drawn according to the description of the wiring mode of the equipment, then the graph-model matching association and the node number information calculation of the equipment model are carried out, and finally the model database is updated according to the graph-model matching association result and the node number information, so that the power distribution network model is built quickly according to the wiring mode, the drawing modeling efficiency is improved, meanwhile, the model database is built by adopting the object-oriented modeling mode, the expansion of new equipment types can be adapted, the power distribution network model is built quickly by combining the automatic drawing technology and the object-oriented modeling technology on the premise that the requirements of analysis and application of the power distribution network are met on the basis that the existing power distribution network model is required to be described, the power distribution network drawing modeling is improved, and the power distribution network model requirements in the aspects of power distribution network operation monitoring, simulation analysis, planning research and the like can be met.
Fig. 2 is a schematic diagram of a model database in an embodiment of the power distribution network drawing modeling method of the present invention. As shown in fig. 2, in one embodiment, the model database constructed according to step S101 includes: device table, device attribute table, device measurement table, device type definition table, attribute type definition table, and measurement type definition table.
Further, the device table is used to store basic information of all devices. In particular, all devices in the entire grid, including the device container, are stored in the device table. Further, the main fields of the device table are: ID, name, type, number of nodes, node number, etc. The device table ID may be a key, the name corresponds to the device name, the device table type points to the device type definition table ID, the node number corresponds to the node number, for example, if the node number is 3, then there are a node 0 number, a node 1 number, and a node 2 number.
The device attribute table is used to store attributes of all devices. Specifically, all the attributes of all the devices in the whole power grid are stored in the device attribute table. Further, the main fields of the device attribute table are: ID, type, attribute value, etc. Wherein the device attribute table ID may be a key, the device attribute table type points to the attribute type definition table ID, and the attribute value corresponds to the device attribute.
The device measurement table is used for storing measurements of all devices. In particular, the measurements of all devices in the whole grid are stored in a device measurement table, which preferably stores the basic type of measurements of all devices. Further, the main fields of the device measurement table are: ID, type, measurement, unit, etc. The device table ID may be a key, the device measurement table type points to the measurement type definition table ID, the measurement value is the measurement of the device, and the unit is the measurement unit.
The device type definition table is used for storing device type information defining types, type relations and type correspondence drawing components of all devices. Specifically, the device type definition table includes device type information, where the device type information is used to define types of all devices in the power grid, relationships between the types, such as inheritance relationships, and define drawing components corresponding to the devices of the various types. Further, the main fields of the device type definition table are: ID, name, parent ID, etc. Wherein, the device type definition table ID may be a character type keyword, the name corresponds to the device type name, and the parent ID corresponds to the ID of the device parent type.
The attribute type definition table is used to store attribute type information defining attributes of each type of device. Specifically, the attribute type definition table includes attribute type information for defining attributes possessed by each type of device. Further, the main fields of the attribute type definition table are: ID, name, device type, etc. Wherein the attribute type definition table ID may be a character type key, the name corresponds to an attribute name, and the attribute type definition table device type field points to the device type definition table ID.
The measurement type definition table is used for storing measurement type information defining the measurement of each type of device. Specifically, the measurement type definition table includes measurement type information for defining measurements of each type of equipment. Further, the main fields of the measurement type definition table are: ID, name, device type, etc. The measurement type definition table ID may be a character type key, the name corresponds to the measurement name, and the measurement type definition table device type field also points to the device type definition table ID.
In one embodiment, before step S101, detecting whether a model database has been built, if so, skipping step S101 to step S103; if not, the process proceeds to step S101.
Traditional power systems such as distribution automation systems construct a distribution network model database in a relational database modeling mode, wherein the relational database can change frequently and is inconvenient to expand because new equipment types of the distribution network occur frequently. In the implementation, an object-oriented modeling mode is adopted to construct a model database comprising six core data tables, such as an equipment table, an equipment attribute table, an equipment measurement table, an equipment type definition table, an attribute type definition table and a measurement type definition table, so that new equipment types can be added with new attributes and measurement on the basis of old equipment types in an inheritance mode, and specifically, the newly added equipment types can be realized in a mode of additionally recording the six core data tables in the corresponding tables without modifying a model database structure, thereby meeting the requirements of analysis application of a distribution network and being convenient to expand.
In one embodiment, step S103 includes:
sequentially determining the wiring modes of a main line and a branch line according to the wiring modes of the equipment;
generating a graphic layout file according to the wiring modes of the trunk line and the branch line;
and generating the electric wiring diagram according to the graphic layout file.
In this embodiment, the method for realizing rapid drawing is a drawing method in which the layers are refined from macroscopic to microscopic. Specifically, the wiring mode of the main line is determined firstly according to the wiring mode of the power distribution network system equipment, then the wiring mode of the branch line is determined, then a graphic layout file is generated according to the wiring modes of all the main lines and the descriptions of the wiring modes of the branch lines, and finally the drawing software generates an SVG format electric wiring diagram according to the graphic layout file, so that the drawing of electric elements one by one is not needed, the quick drawing of the electric wiring diagram of the power distribution network is realized, and the electric wiring diagram is displayed and applied by other systems.
In one implementation, in order to facilitate the input of drawing information, a layout wiring method based on matrixing is further adopted. As shown in fig. 3, step S103 further includes:
step S1031: and carrying out matrixing division on the equipment according to the equipment wiring mode to obtain the cells. Specifically, the equipment is divided into a plurality of cells in a matrix mode according to the wiring mode of the power distribution network line equipment.
Step S1033: and obtaining the graphic primitive and drawing coordinate information according to the layout information of the cells. Specifically, wiring is drawn on the devices in each cell obtained by matrixing and dividing, and then wiring among the cells is drawn according to the adjacent relation of the cells in the matrix. Further, firstly, forming a graphic element required for drawing according to the layout information of the cells in the matrix, wherein the graphic element comprises components, terminals, connecting wires and the like; and calculating corresponding drawing coordinate information according to the position information in the cell layout information in the pattern matrix.
Step S1035: and drawing the electrical wiring diagram according to the graphic element and the drawing coordinate information. Specifically, drawing is performed according to the graphic primitive and the drawing coordinate information, and an electrical connection diagram in an SVG format is obtained. Further, after drawing, the related information of the graphic element can be modified again, such as renaming the graphic element according to personal habit.
In one embodiment, a distribution line composition apparatus includes: a power supply point (a feeder substation outlet switch), a sectionalizer, a branch switch, a load, a ring main unit, a T-junction and a feeder section. When matrix division is carried out, the feeder line sections are used as the connection among the cells according to the wiring mode of the distribution line composition equipment, and the other feeder line sections are used as the cells. And then inputting cell information according to matrix arrangement, wherein adjacent cells in each row of the matrix are considered to have connecting lines, namely feeder sections, no connecting lines exist between columns, and for T joints, connecting lines, namely feeder sections, exist between the rows and the columns. And after matrixing and dividing, obtaining the graphic primitive and drawing coordinate information according to the layout information of the cells. And finally, forming the required graphic elements for drawing according to the layout information of the cells in the matrix, wherein the graphic elements comprise components, terminals, connecting wires and the like, calculating corresponding drawing coordinates according to the position information in the layout information of the cells in the matrix, and drawing to obtain an electrical connection wiring diagram in an SVG format, so that the rapid drawing of the electrical wiring diagram of the power distribution network is realized, and the electrical connection wiring diagram is displayed and applied by other systems without drawing one electrical element by one.
In one embodiment, step S103 further comprises manually modifying the electrical wiring diagram. Specifically, the electrical wiring diagram can be further modified and perfected by manual operation according to different requirements under different conditions so as to adapt to meet various real-time requirements.
In one embodiment, as shown in fig. 4, step S105 further includes:
step S1051: and matching and associating the primitive with the equipment model of the corresponding type, and generating corresponding model information. Specifically, according to the primitives in step S103, automatic device model matching association is performed, and corresponding model information is generated. Further, the model is not matched for the terminal sub-element; for the connecting wires, if the connecting wires in the assembly are the connecting wires, the model is not matched; for the connection line between the components, matching the connection line into a feeder line section; for a component, the corresponding device model type is automatically matched. Further, for a component, the corresponding device model may be automatically matched according to the contents of the device type definition table in the model database. And after the matching and association of the graphic primitives are completed, generating corresponding model information.
Step S1052: and updating the model information into the attribute of the primitive. Specifically, the keywords of the model information generated in step S1051 are recorded in the attributes of the primitives, so as to realize the matching association of the graphics modes. Further, after the pattern matching association is completed, the related information of the graphic element can be modified again, such as renaming the graphic element according to personal habit.
In one embodiment, as shown in fig. 5, step S107 includes:
step S1071: and generating equipment connection relations according to the coordinate relations of the primitives in the electrical wiring diagram. Specifically, according to the coordinate relation of the graphic elements in the electrical wiring diagram in the SVG format, the equipment connection relation is generated. Further, the device connection relationship is mainly embodied as a relationship between "connection line-primitive terminal".
Step S1072: and generating node number information of the equipment model according to the connection relation of the primitives and the equipment model matched and associated with the primitives. Specifically, according to the connection relation of the graphic elements in the electrical wiring diagram and the related information of the equipment model related to the graphic element matching, the node number generating principle is combined to generate the corresponding relation between the equipment and the node number, and the corresponding relation is updated to the model database, for example, the corresponding relation can be written into the equipment table of the model database.
The principle of generating node numbers is as follows: the primitives are composed of one or more terminals, and the principle of generating node numbers is as follows: each primitive terminal generates a node number that is the same for terminals connected together by the connection lines of the unassociated devices.
In one embodiment, step S109 includes:
determining the father type of the equipment model obtained according to the pattern matching association according to the model database;
updating the model database according to the attribute and measurement of the father type;
and updating the model database according to the node number information.
In the implementation, on one hand, the equipment model associated with the primitive is updated to the model database according to the attribute and measurement of the father type, and on the other hand, the node number information is updated to the model data, so that the equipment model is put in storage. Specifically, all father types of the device model are determined according to the device model associated with the primitive in the model data, the attributes and the measurement of all father types are obtained, and the records of the attributes and the measurement are automatically generated, namely, the attributes and the measurement of the device type in the model database are updated. Further, according to the device attribute type template and the device measurement type template in the model data, for the designated device type, all father types of the designated device type are obtained according to the device type definition table, and according to the attributes and measurements corresponding to all father types, finally, records of the device attribute table and the device measurement table in the model database are generated, namely, the content of the device attribute table and the device measurement table is updated. Further, the device model name and attribute value information may be modified at the same time or after the step of updating the device model associated with the primitive into the model data according to the attribute and measurement of the parent type and the node number information is completed. On the other hand, according to the node number information of the equipment model, the node information in the updated model database is modified, and further, the node number information of the equipment model is updated into the equipment table of the model database. Further, an XML (extensible markup language) file of the device model is generated for the information of the model database for enabling transmission of device model data between various applications.
In one embodiment, a secondary device model is constructed from a model database. Specifically, the equipment model can be further matched and associated with RTU (remote control unit), and the equipment measurement is matched and associated with the communication point, so that a secondary equipment model is constructed, and other requirements of the power distribution network system can be met through expansion of the equipment model.
The technical scheme of the power distribution network drawing modeling method of the invention is further described in detail below with reference to another embodiment. Fig. 6 is a schematic diagram of a specific three-link distribution network. As shown in fig. 6, the three-link distribution network in this embodiment is a ring network composed of three power supply points, i.e., three feeder lines of S1, S2, and S3. Wherein, CB1, CB2, CB3 are the transformer substation outgoing line switches of three feeder lines, BS1, BS2, BS3 are corresponding transformer substation bus bars, corresponding to S1 consisting of BS1+cb1, S2 consisting of BS2+cb2, S3 consisting of BS3+cb3, FB1, FB2, FB3, FB4, FB5 and FB6 are feeder line segment switches, LL1, LL2 are feeder line tie switches, LD1, LD2, LD3, LD4, LD5, LD6 and LD7 are load devices. T1 and T2 are two nodes.
Fig. 7 is a flowchart of implementation of the power distribution network drawing modeling method of the three-link power distribution network shown in fig. 6, and as shown in fig. 7, the implementation of the power distribution network drawing modeling method includes:
(1) And detecting whether a model database is established, if not, entering a model database establishment flow, namely establishing the model database of the equipment by using an object-oriented modeling mode. The constructed model database comprises six core data tables, namely an equipment table, an equipment attribute table, an equipment measurement table, an equipment type definition table, an attribute type definition table, a measurement type definition table and the like.
(2) And drawing an electrical wiring diagram according to the description of the wiring mode of the equipment. Specifically, when the existing model database is detected, a wiring mode of the three-link distribution network is input, a graphic layout file is generated, and an electrical wiring diagram is drawn according to the graphic layout file. When drawing, the drawn electrical wiring diagram can be manually modified according to other requirements, and finally the electrical wiring diagram in the SVG format after modification is obtained.
Specifically, according to the wiring relation of the three-link distribution network shown in fig. 6, matrix entry is performed, and only specific types of matrixes are needed to be entered, wherein the content of the matrixes is as follows:
S
|
LD
|
CB
|
LD
|
CB
|
T
|
CB
|
LD
|
CB
|
LD
|
CB
|
LD
|
S
|
|
|
|
|
|
T
|
CB
|
LD
|
CB
|
LD
|
CB
|
LD
|
S |
drawing and wiring are performed according to the above matrix. For convenience of the following description herein, it is assumed that the primitive names are modified as shown in fig. 6 after drawing. According to the connection relation of the matrix, connection lines are formed, and in this example, besides connection lines are generated between the unit cells, connection lines between the bus bars and the switches are also arranged inside the three power supply points. Here, p0, p1, … denote terminals of the element. The connection line name is composed of a head terminal-a tail terminal.
(3) And carrying out graph-model matching association on the electrical wiring diagram and the model database. Specifically, according to the matrix primitive information and the connecting lines, a correlation model of the primitives is generated. Wherein the power point internal connection lines BS1-CB1.p0, BS2-CB2.p0 and BS3-CB3.p0 are not related to the model.
(4) And obtaining node number information of the equipment model according to the electric wiring diagram and the graph model matching correlation result. Specifically, node number information is generated according to the relationship between the connection line terminals. For this embodiment, each load point (LD) and T node generates a node number. Each sectionalizer (CB) generates two node numbers, each S generates two node numbers, the outlet switch FB generates two node numbers, and the substation bus BS has one node number consistent with one of the node numbers of FB. Thus, the basic information of the equipment model is created, and the data is formed as shown in fig. 8. It should be noted that fig. 8 only lists a part of model data, and the rest is similar, and will not be further described.
(5) And updating the model database according to the graph mode matching association result and the node number information. Specifically, according to the equipment attribute template and the equipment measurement type template, records of an equipment attribute table and an equipment measurement table in a model database are generated, namely, the equipment model is put in storage.
In the embodiment, the three-link distribution network is subjected to drawing modeling by using the distribution network drawing modeling method provided by the invention, so that the electrical wiring diagram can be quickly drawn according to the wiring mode description of the electrical wiring diagram. The method has the advantages that electrical element drawing is not needed one by one, the method can adapt to expansion of new equipment types, the new equipment types are added without modifying a model database structure, efficiency and expansibility of drawing modeling of the three-way distribution network are improved, and the method can meet power grid model requirements in aspects of operation monitoring, simulation analysis, planning research and the like of the three-way distribution network.
Furthermore, the invention also provides a computer readable storage medium, on which a computer program is stored, which computer program, when being processed and executed, implements the steps of the power distribution network drawing modeling method provided by the invention.
In addition, the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of the power distribution network drawing modeling method provided by the invention when executing the program.
In addition, as shown in fig. 9, the invention also provides a power distribution network drawing modeling system, which comprises,
a model database construction module 100 for constructing a model database of the device using an object-oriented modeling manner;
an electrical wiring diagram drawing module 200 for drawing an electrical wiring diagram according to the description of the wiring manner of the device;
the pattern matching association module 300 is configured to perform pattern matching association on the electrical wiring diagram and the model database;
the node number generating module 400 is configured to obtain node number information of the equipment model according to the electrical wiring diagram and the pattern matching correlation result;
a model database updating module 500, configured to update the model database according to the graph-model matching association result and the node number information;
the model database construction module 100 is respectively connected with the graph and model matching association module 300 and the model database updating module 500, and the electrical wiring diagram drawing module 200, the graph and model matching association module 300, the node number generating module 400 and the model database updating module 500 are sequentially connected.
According to the power distribution network drawing modeling system, the model database of the equipment is built by utilizing the object-oriented modeling mode, then the electrical wiring diagram is drawn according to the description of the wiring mode of the equipment, then the graph-model matching association and the node number information calculation of the equipment model are carried out, and finally the model database is updated according to the graph-model matching association result and the node number information, so that the power distribution network model is built quickly according to the wiring mode, the drawing modeling efficiency is improved, meanwhile, the model database is built by adopting the object-oriented modeling mode, the expansion of new equipment types can be adapted, the expansibility of the power distribution network drawing modeling is improved, and the power distribution network model requirements in the aspects of power distribution network operation monitoring, simulation analysis, planning research and the like can be met.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.