Power grid flow calculation method and device based on Modelica

Through the Modelica language and the method of decomposing topological structure, a grid trend computing simulation system was established, which solved the problem of low efficiency of grid trend computing engineering, and achieved efficient trend computing and multi-field simulation support.

CN114117800BActive Publication Date: 2025-03-21SUZHOU TONGYUAN SOFT CONTROL INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111435944.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-03-21
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

The engineering efficiency of power grid trend computing is not high and cannot support multi-field simulation.

Method used

Using the Modelica language, by decomposing the topological structure of the real grid trend system into multiple trend computing system sub-models, a basic model library is established, and a trend computing simulation system is established through preset connectors to connect the interface model, component model and stand-alone device model to perform grid trend simulation calculation.

Benefits of technology

It realizes a physical system that reflects trend computing more realistically, reduces the difficulty of model development, improves the reusability of models, shortens the development cycle of trend computing programs, and improves engineering design efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114117800B_ABST
    Figure CN114117800B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for calculating power flow based on Modelica. The method includes decomposing a plurality of power flow calculation system sub-models according to the topological structure of a real power flow system; establishing a basic model library according to the plurality of power flow calculation system sub-models, wherein the basic model library includes: an interface model, a component model, a single-machine device model, and a system model; connecting the interface model, the component model, and the single-machine device model according to a preset modeling method according to a preset connector to establish a power flow calculation simulation system, wherein the power flow calculation simulation system is obtained by simulating the real power flow system based on Modelica; and performing power flow simulation calculation according to the task requirements of the power flow calculation simulation system. The present application solves the technical problems that the engineering efficiency of power flow calculation is low and cannot support simulation in multiple fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of application of Modelica language in power grid analysis, and specifically, to a method and device for calculating power grid flow based on Modelica. Background Art

[0002] As an open, object-oriented, equation-based, multi-domain unified modeling language for physical systems, Modelica meets the needs of the development direction of modeling and simulation. It is suitable for various subsystem models including mechanical, electrical, hydraulic, control, and large-scale complex heterogeneous physical systems.

[0003] The power grid flow calculation is to find out the operating status of the entire network based on the given network structure, component parameters and operating conditions, including the voltage of each bus, power distribution in the network, power loss, etc.

[0004] In the related technologies, the modeling process of power grid flow calculation is relatively complicated, and the reusability and scalability of the developed model are low, which reduces work efficiency.

[0005] Currently, no effective solution has been proposed to address the problems in related technologies of low engineering efficiency of power grid flow calculation and inability to support multi-field simulation. Summary of the invention

[0006] The main purpose of this application is to provide a method and device for calculating power flow based on Modelica to solve the problem that the engineering efficiency of power flow calculation is low and cannot support simulation in multiple fields.

[0007] In order to achieve the above objective, according to one aspect of the present application, a method for calculating power flow in a power grid based on Modelica is provided.

[0008] The power grid flow calculation method based on Modelica according to the present application includes: obtaining multiple power flow calculation system sub-models according to the topological structure decomposition of the real power grid flow system; establishing a basic model library according to the multiple power flow calculation system sub-models, wherein the basic model library includes: interface model, component model, single-machine equipment model, system model; connecting the interface model, the component model, and the single-machine equipment model according to a preset modeling method according to a preset connector to establish a power flow calculation simulation system, wherein the power flow calculation simulation system is obtained by simulating the real power grid flow system based on Modelica; and performing power grid flow simulation calculation according to the task requirements of the power grid flow calculation simulation system.

[0009] Furthermore, a basic model library is established based on the multiple power flow calculation system sub-models, wherein the basic models include: interface models, component models, stand-alone equipment models, and system models, including: the interface model is used as the input and output characteristics of each component itself and the transmission relationship between components; the component model is used as the own characteristics of the actual physical element or equipment; the stand-alone model is used as the electrical properties of the actual physical equipment in the power flow calculation system.

[0010] Furthermore, a basic model library is established based on the multiple power flow calculation system sub-models, wherein the basic model library includes: interface model, component model, single-machine equipment model, system model, including: decomposing the component model of the basic model library into: generator component, transformer component, transmission line component, load component and corresponding component data, etc.

[0011] Furthermore, the preset connector is obtained in the following manner: the connectors of the power flow calculation simulation system include: an electrical connector, a thermal connector, a translational mechanical connector and a rotational mechanical connector, and the variables of the connector include flow variables and potential variables.

[0012] Furthermore, a basic model library is established based on the multiple power flow calculation system sub-models, wherein the basic model library includes: an interface model, a component model, a single-machine equipment model, and a system model, including: each component model of the power flow calculation simulation system is established separately using an object-oriented declarative modeling method; the physical model of the component model is converted into a mathematical model expressed in equations, and the mathematical model is converted into a numerical model; based on boundary conditions and initial values, the numerical model is used for simulation; the numerical model is implemented using the Modelica language to obtain a component model; the component model is connected to the system model for simulation, and if the two are consistent, the component model is verified.

[0013] Furthermore, the decomposition according to the topological structure of the real power grid power flow system obtains multiple power flow calculation system sub-models, including: a preset processing scheme based on data abstraction, interface separation, and modularization, and the decomposition according to the topological structure of the real power grid power flow system obtains multiple power flow calculation system sub-models, wherein the data abstraction is used to extract the common features in the model and express them with an abstract model; the interface separation is used to model different components and equipment models separately, and declare component properties during the model instantiation process; the modularization includes: a power flow calculation simulation system interface model, various component models, and a system model for power flow calculation.

[0014] Furthermore, the power grid flow simulation calculation is performed according to the task requirements of the power grid flow calculation system, including: based on the established Modelica power grid flow calculation simulation system, power grid flow simulation calculation is performed, according to the preset power grid architecture and given network parameters and component parameters, the component model combination is used to build the current power flow calculation simulation system, wherein the components are connected by connectors, and the voltage and current balance equations are established in the system through the connection relationship of the connectors.

[0015] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a power grid flow calculation device based on Modelica is provided.

[0016] The power grid flow calculation device based on Modelica according to the present application includes: a splitting module, which is used to decompose the topological structure of the real power grid flow system to obtain multiple power flow calculation system sub-models; a basic model module, which is used to establish a basic model library based on the multiple power flow calculation system sub-models, wherein the basic model library includes: an interface model, a component model, a single-machine device model, and a system model; a simulation module, which is used to connect the interface model, the component model, and the single-machine device model according to a preset modeling method according to a preset connector to establish a power flow calculation simulation system, wherein the power flow calculation simulation system is obtained by simulating the real power grid flow system based on Modelica; a calculation module, which is used to perform power grid flow simulation calculation according to the task requirements of the power grid flow calculation simulation system.

[0017] In order to achieve the above objective, according to another aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the method when running.

[0018] In order to achieve the above objective, according to another aspect of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the described method.

[0019] In the embodiment of the present application, the power grid flow calculation method and device based on Modelica adopt a method of decomposing a plurality of power flow calculation system sub-models according to the topological structure of the real power grid flow system and establishing a basic model library according to the plurality of power flow calculation system sub-models. By connecting the interface model, the component model, and the stand-alone equipment model according to a preset modeling method according to a preset connector, a power flow calculation simulation system is established, thereby achieving the purpose of performing power grid flow simulation calculation according to the task requirements of the power grid flow calculation simulation system, thereby achieving a more realistic reflection of the power flow calculation physical system, reducing the difficulty of model development, and improving the reusability of the model. At the same time, it can effectively shorten the development cycle of the power flow calculation program and improve the design efficiency of the project. The technical effect solves the technical problem that the engineering efficiency of power grid flow calculation is low and cannot support simulation in multiple fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings constituting a part of this application are used to provide a further understanding of this application, so that other features, purposes and advantages of this application become more obvious. The schematic embodiment drawings and their descriptions of this application are used to explain this application and do not constitute an improper limitation on this application. In the drawings:

[0021] Figure 1 It is a schematic diagram of the structure of a model library of a power grid power flow calculation method based on Modelica according to an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of a flow chart of a method for calculating power flow based on Modelica according to an embodiment of the present application;

[0023] Figure 3 is a schematic diagram of the structure of a power grid flow calculation device based on Modelica according to an embodiment of the present application;

[0024] Figure 4 It is a schematic diagram of the compilation and solution process of the Modelica model in the Modelica-based power grid flow calculation method according to an embodiment of the present application;

[0025] Figure 5 This is a modeling and simulation architecture diagram of a power grid flow calculation method based on Modelica according to an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of connector types in a power grid power flow calculation method based on Modelica according to an embodiment of the present application;

[0027] Figure 7 is a structural diagram of a power flow calculation system model library of a power flow calculation method based on Modelica according to an embodiment of the present application;

[0028] Figure 8 It is a power flow calculation system model diagram of the power grid power flow calculation method based on Modelica according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] In the present application, the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings. These terms are mainly used to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific orientation, or to be constructed and operated in a specific orientation.

[0032] In addition, some of the above terms may be used to express other meanings in addition to indicating orientation or positional relationship. For example, the term "on" may also be used to express a certain dependency or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in this application can be understood according to specific circumstances.

[0033] In addition, the terms "installed", "set", "provided with", "connected", "connected", and "socketed" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be an internal connection between two devices, elements, or components. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0034] The use of this method in the embodiments of the present application can more realistically reflect the physical system of the power flow calculation, greatly reduce the difficulty of model development, significantly improve the reusability of the model, effectively shorten the development cycle of the power flow calculation program, and improve the design efficiency of the project. It is very necessary to provide a power grid power flow calculation method that is easy to understand, has high engineering efficiency, supports multi-field simulation, and can reflect the actual physical system.

[0035] The invention discloses a power flow calculation method based on Modelica, which comprises several parts: power flow calculation system model design decomposition, power flow calculation system model realization based on Modelica, and power flow calculation method realization based on Modelica.

[0036] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0037] like Figure 1 As shown in the figure, according to the physical characteristics of the power system structure and the model assumptions, the power flow calculation system is decomposed into typical components, including generators, transformers, transmission lines, loads, etc. Based on the component decomposition, the main decomposition is carried out for modeling needs. The main decomposition is to bring together the common attributes of some models to form a super model for reuse, such as the component base class model and the connector template model.

[0038] like Figure 2 As shown, the method includes the following steps S201 to S204:

[0039] Step S201, decomposing a plurality of power flow calculation system sub-models according to the topological structure of the real power grid power flow system;

[0040] Step S202, establishing a basic model library according to the plurality of power flow calculation system sub-models, wherein the basic model library includes: an interface model, a component model, a single-machine equipment model, and a system model;

[0041] Step S203, connecting the interface model, the component model, and the stand-alone equipment model according to a preset modeling method according to a preset connector to establish a power flow calculation simulation system, wherein the power flow calculation simulation system is obtained by simulating the real power grid power flow system based on Modelica;

[0042] Step S204, performing power flow simulation calculation according to the task requirements of the power flow calculation simulation system.

[0043] From the above description, it can be seen that the present application achieves the following technical effects:

[0044] The method of decomposing a plurality of power flow calculation system sub-models according to the topological structure of a real power grid power flow system and establishing a basic model library according to the plurality of power flow calculation system sub-models is adopted. By connecting the interface model, the component model and the single-machine equipment model according to a preset modeling method according to a preset connector, a power flow calculation simulation system is established, thereby achieving the purpose of performing power grid power flow simulation calculation according to the task requirements of the power grid power flow calculation simulation system, thereby achieving a more realistic reflection of the power flow calculation physical system, reducing the difficulty of model development, improving the reusability of the model, and effectively shortening the development cycle of the power flow calculation program, and improving the design efficiency of the project. The technical effect further solves the technical problem that the engineering efficiency of power grid power flow calculation is low and cannot support simulation in multiple fields.

[0045] In the above step S201, it is necessary to decompose a plurality of power flow calculation system sub-models according to the topological structure of the real power grid power flow system, and the topological structure of the real power grid power flow system corresponds one-to-one with the actual scene. The plurality of power flow calculation system sub-models may include a plurality of models, such as an interface model, a component model, a single machine model, and a system model.

[0046] In the specific implementation, on the basis of fully considering the reusability of the model, the design decomposition ideas of data abstraction, interface separation, and modularization are proposed, and the decomposition is carried out according to the actual topological structure of the system. Based on the above ideas, the system is decomposed into the following categories: interface model, component model, single machine model, and system model.

[0047] In a specific implementation, a single device can be further divided into a generator, a load, a transmission line, a transformer, a bus, etc., and the component model corresponds to the physical device one by one.

[0048] In a preferred embodiment, a basic model library is established based on the multiple power flow calculation system sub-models, wherein the basic models include: interface model, component model, stand-alone equipment model, system model, including: the interface model is used as the input and output characteristics of each component itself and the transmission relationship between components; the component model is used as the actual physical element or equipment's own characteristics; the stand-alone model is used as the electrical properties of the actual physical equipment in the power flow calculation system.

[0049] In the above step S202, a basic model library is established according to the multiple power flow calculation system sub-models, wherein the basic model library includes: interface models, component models, single-machine equipment models, and system models.

[0050] In specific implementation, the basic model library is the smallest construction unit in the power flow calculation system model library. The basic model library can build the upper-level model through connection, and the component model is usually composed of more general basic models. The principle of dividing the basic model and the component model is to start with a simple model and gradually increase the model complexity according to the needs.

[0051] In a specific implementation, the main basic models of the power flow calculation simulation system model library are the interface model, the component model and the single-machine equipment model. The interface model represents the input and output characteristics of each component and the transmission relationship between components. The component model represents the actual physical elements or equipment's own characteristics. The single-machine model represents the electrical properties of the actual physical equipment in the power flow calculation system.

[0052] In a preferred implementation, the component models of the basic model library are decomposed into: generator components, transformer components, transmission line components, load components and corresponding component data, etc.

[0053] In the above step S203, the interface model, the component model, and the stand-alone equipment model may be connected according to a preset connector in accordance with a preset modeling method to establish a power flow calculation simulation system.

[0054] In the specific implementation, the foundation for establishing the component model of the power flow calculation system has been established, including the basic model, connectors and modeling methods, etc. Each component model of the power flow calculation system is established separately using the object-oriented declarative modeling method and is not dependent on the external environment.

[0055] In a specific implementation, the power flow calculation simulation system is obtained by simulating the real power grid power flow system based on Modelica.

[0056] In a preferred embodiment, the preset connector is obtained as follows: the connectors of the power flow calculation simulation system include: electrical connectors, thermal connectors, translational mechanical connectors and rotational mechanical connectors, and the variables of the connectors include flow variables and potential variables.

[0057] In the above step S204, the power grid flow simulation calculation is finally performed according to the task requirements of the power grid flow calculation simulation system. According to the topological structure of the power system, the component models are combined and connected to establish an actual power flow calculation system model, and a simulation study is performed on it, and the simulation results are compared with the expected theoretical characteristics of the system, and the system model is adjusted according to the simulation results until it meets the theoretical requirements.

[0058] In a specific implementation, after the system model verification is completed, relevant simulation analysis can be carried out according to the task requirements of the power grid flow calculation system to obtain the required information and knowledge through the model.

[0059] In a preferred embodiment, the power flow calculation system modeling and simulation system is implemented based on the Modelica and MWorks platforms, providing a series of functions including model development, management, compilation, solution and post-processing.

[0060] As a preference in this embodiment, a basic model library is established according to the multiple power flow calculation system sub-models, wherein the basic model library includes: an interface model, a component model, a single-machine equipment model, and a system model, including: each component model of the power flow calculation simulation system is established separately using an object-oriented declarative modeling method; the physical model of the component model is converted into a mathematical model expressed in equations, and the mathematical model is converted into a numerical model; based on boundary conditions and initial values, the numerical model is used for simulation; the numerical model is implemented using the Modelica language to obtain a component model; the component model is connected to the system model for simulation, and if the two are consistent, the component model is verified.

[0061] In the specific implementation, the physical model of the component is converted into a mathematical model expressed in equations, and then the mathematical model is converted into a reasonable numerical model. Given reasonable boundary conditions and initial values, the numerical model can be used for direct simulation. Finally, the numerical model is implemented using the Modelica language to obtain the component model. Each mathematical equation of the component model is independently written in the most natural form, without specifying the input and output variables and the order of solving the equation, and has non-causal characteristics. The equations are kept consistent with the form in books and literature to ensure readability and knowledge accumulation. Subsequently, the models of all components are established one by one, and the models are managed in a model library through a certain classification method.

[0062] Preferably, the component model needs to be connected to the system model for simulation, and the simulation results of the component are compared with the expected theoretical results. If the two are consistent, it means that the component model is verified; if the two are inconsistent, the component model needs to be modified and improved until the component model meets the requirements.

[0063] As a preferred embodiment of the present invention, the decomposition according to the topological structure of the real power grid power flow system obtains multiple power flow calculation system sub-models, including: a preset processing scheme based on data abstraction, interface separation, and modularization, and the decomposition according to the topological structure of the real power grid power flow system obtains multiple power flow calculation system sub-models, wherein; the data abstraction is used to extract the common features in the model and express them with an abstract model; the interface separation is used to model different components and device models separately, and declare component properties during the model instantiation process; the modularization includes: a power flow calculation simulation system interface model, various component models, and a system model for power flow calculation.

[0064] In specific implementation, the data abstraction, that is, extracting the common features in the model and expressing them with an abstract model, is an important means to improve the reusability of the model. The interface separation, that is, modeling different components and equipment models separately, and declaring component properties during model instantiation. The modular design decomposition includes the interface model of the flow calculation system, various component models, and the system model of the flow calculation. The connector, as part of the component model, is used to realize information transmission between the component and the outside world, and between different components. The connector contains various physical quantities that need to be described, such as pressure and flow in hydraulic fluid components, voltage and current in electronic components, angle and torque in drive components, etc.

[0065] As a preferred embodiment of the present invention, the power grid flow simulation calculation is performed according to the task requirements of the power grid flow calculation system, including: based on the established Modelica power grid flow calculation simulation system, a power grid flow simulation calculation is performed, and according to the preset power grid architecture and given network parameters and component parameters, the component model combination is used to build the current power flow calculation simulation system, wherein the components are connected by connectors, and the voltage and current balance equations are established in the system through the connection relationship of the connectors.

[0066] In the specific implementation, after establishing the power grid flow calculation system model based on Modelica, the component model can be used to quickly combine and build the power flow calculation system model according to the specific power grid architecture and given network parameters and component parameters. Components are connected by connectors, and the voltage and current balance equations are automatically established in the system through this connection relationship. By using the multi-domain unified modeling and simulation software MWorks as a supporting tool and the power flow calculation system model as a carrier, the power flow calculation of the power system with a specific architecture is completed through parameter configuration and model compilation and solution.

[0067] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0068] According to an embodiment of the present application, a Modelica-based power flow calculation device for implementing the above method is also provided, such as Figure 3 As shown, the device comprises:

[0069] A splitting module 301 is used to decompose a plurality of power flow calculation system sub-models according to a topological structure of a real power grid power flow system;

[0070] A basic model module 302 is used to establish a basic model library according to the multiple power flow calculation system sub-models, wherein the basic model library includes: an interface model, a component model, a single-machine equipment model, and a system model;

[0071] The simulation module 303 is used to connect the interface model, the component model, and the stand-alone equipment model according to a preset modeling method according to a preset connector to establish a power flow calculation simulation system, wherein the power flow calculation simulation system is obtained by simulating the real power grid power flow system based on Modelica;

[0072] The calculation module 304 is used to perform power flow simulation calculation according to the task requirements of the power flow calculation simulation system.

[0073] In the splitting module 301 of the embodiment of the present application, it is necessary to decompose multiple power flow calculation system sub-models according to the real power grid power flow system topology structure, and the real power grid power flow system topology structure corresponds one to one with the actual scene. The multiple power flow calculation system sub-models may include multiple models, such as interface models, component models, stand-alone equipment models, and system models.

[0074] In the specific implementation, on the basis of fully considering the reusability of the model, the design decomposition ideas of data abstraction, interface separation, and modularization are proposed, and the decomposition is carried out according to the actual topological structure of the system. Based on the above ideas, the system is decomposed into the following categories: interface model, component model, single machine model, and system model.

[0075] In a specific implementation, a single device can be further divided into a generator, a load, a transmission line, a transformer, a bus, etc., and the component model corresponds to the physical device one by one.

[0076] In a preferred embodiment, a basic model library is established based on the multiple power flow calculation system sub-models, wherein the basic models include: interface model, component model, stand-alone equipment model, system model, including: the interface model is used as the input and output characteristics of each component itself and the transmission relationship between components; the component model is used as the actual physical element or equipment's own characteristics; the stand-alone model is used as the electrical properties of the actual physical equipment in the power flow calculation system.

[0077] In the basic model module 302 of the embodiment of the present application, a basic model library is established according to the multiple power flow calculation system sub-models, wherein the basic model library includes: an interface model, a component model, a single-machine equipment model, and a system model.

[0078] In specific implementation, the basic model library is the smallest construction unit in the power flow calculation system model library. The basic model library can build the upper-level model through connection, and the component model is usually composed of more general basic models. The principle of dividing the basic model and the component model is to start with a simple model and gradually increase the model complexity according to the needs.

[0079] In a specific implementation, the main basic models of the power flow calculation simulation system model library are the interface model, the component model and the single-machine equipment model. The interface model represents the input and output characteristics of each component and the transmission relationship between components. The component model represents the actual physical elements or equipment's own characteristics. The single-machine model represents the electrical properties of the actual physical equipment in the power flow calculation system.

[0080] In a preferred implementation, the component models of the basic model library are decomposed into: generator components, transformer components, transmission line components, load components and corresponding component data, etc.

[0081] In the simulation module 303 of the embodiment of the present application, the interface model, the component model, and the stand-alone device model may be connected according to a preset modeling method using a preset connector to establish a power flow calculation simulation system.

[0082] In the specific implementation, the foundation for establishing the component model of the power flow calculation system has been established, including the basic model, connectors and modeling methods, etc. Each component model of the power flow calculation system is established separately using the object-oriented declarative modeling method and is not dependent on the external environment.

[0083] In a specific implementation, the power flow calculation simulation system is obtained by simulating the real power grid power flow system based on Modelica.

[0084] In a preferred embodiment, the preset connector is obtained as follows: the connectors of the power flow calculation simulation system include: electrical connectors, thermal connectors, translational mechanical connectors and rotational mechanical connectors, and the variables of the connectors include flow variables and potential variables.

[0085] The calculation module 304 of the embodiment of the present application finally performs power flow simulation calculation according to the task requirements of the power flow calculation simulation system. According to the topological structure of the power system, the component models are combined and connected to establish an actual power flow calculation system model, and a simulation study is performed on it, and the simulation results are compared with the expected theoretical characteristics of the system, and the system model is adjusted according to the simulation results until it meets the theoretical requirements.

[0086] In a specific implementation, after the system model verification is completed, relevant simulation analysis can be carried out according to the task requirements of the power grid flow calculation system to obtain the required information and knowledge through the model.

[0087] In a preferred embodiment, the power flow calculation system modeling and simulation system is implemented based on the Modelica and MWorks platforms, providing a series of functions including model development, management, compilation, solution and post-processing.

[0088] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the present application is not limited to any specific combination of hardware and software.

[0089] In order to better understand the above-mentioned process of the power grid power flow calculation method based on Modelica, the above-mentioned technical solution is explained below in combination with the preferred embodiment, but it is not used to limit the technical solution of the embodiment of the present invention.

[0090] The Modelica-based power flow calculation method in the embodiment of the present application is an object-oriented and equation-oriented power flow calculation method and device with good reusability and hierarchy, which can more realistically reflect the physical system of power flow calculation, greatly reduce the difficulty of model development, significantly improve the reusability of the model, effectively shorten the development cycle of the power flow calculation program, and improve the design efficiency of the project.

[0091] like Figure 4 As shown in FIG. 1 , it is a schematic diagram of the compilation and solution process of the Modelica model in the power grid flow calculation method based on Modelica in the embodiment of the present application, such as Figure 5 , which is a modeling and simulation architecture diagram of a power grid flow calculation method based on Modelica according to an embodiment of the present application.

[0092] The modeling and simulation system of the power flow simulation calculation system in the embodiment of the present application is implemented based on the Modelica and MWorks platforms, providing a series of functions including model development, management, compilation, solving and post-processing. The specific simulation system consists of a data layer, a functional support layer and an interaction layer, such as Figure 5 As shown. The system architecture can use a layered approach to separate logic from data, bottom layer from logic, and display from logic, which is conducive to the further expansion of the model. The interaction layer is the functional layer for interface interaction and interface display between the platform and the user. It mainly includes the model (library) browser, model graphic editing view, model text editing view, component browser, curve output window, etc. The functional support layer mainly provides data management, functional support and extension interface for the user layer. It mainly includes model library configuration module, model view management module, simulation control configuration module, etc. The data layer is the source of software data storage and acquisition, which is divided into model library and database. The model library mainly includes interface model, basic component model of power flow calculation, single machine model of power flow calculation, system model, etc. The database mainly includes product data, model template data, simulation result data, etc.

[0093] The power grid power flow calculation system model constructed by the object-oriented declarative power flow calculation system modeling method has non-causal characteristics. When solving the model, the order of solving the equations is determined according to the data flow environment of the equation system. Figure 4As shown in the figure, the compilation and solution process of the model is roughly divided into three stages: compilation, analysis and optimization, and simulation solution. Among them, the solution order of the equation system is determined in the two stages of analysis and optimization and simulation solution. The compilation process includes grammatical semantic analysis and mathematical equation mapping. The former performs grammatical semantic analysis on the model code according to the Modelica language specification, and the latter completes the generation of the flattened hybrid equation system. After the compilation is completed, the analysis and optimization stage is entered to analyze and optimize the equations of the model, obtain a sequence of solvable equation subsets, and generate the corresponding model C code. Finally, with the help of the solver of the MWorks platform, the model simulation source code that can be compiled independently is constructed, and then the simulation program that can run the model is generated through the C compiler to determine the input and output variables and the order of solving the equations.

[0094] In the Modelica-based power grid power flow simulation calculation method of the present application, the construction of a non-causal power flow calculation system model is achieved based on the following process.

[0095] (1) Determine the model objectives: According to the task of power system flow calculation, determine the objectives and extended uses of the system model, and clarify the information that must be obtained through the model and the information that the model does not need to consider.

[0096] (2) Constructing a conceptual model: The conceptual model is a principle block diagram of the power system, which assists in analyzing the principles and mechanisms of the main phenomena of the system, helps engineers fully understand the physical system, and reflects the modeling ideas.

[0097] (3) System decomposition: First, component decomposition is performed. According to the physical characteristics of the power system structure and the model assumptions, the power flow calculation system is decomposed into typical components, including generators, transformers, transmission lines, loads, etc. Based on the component decomposition, the main decomposition is performed for modeling purposes. The main decomposition is to group the common attributes of some models together to form a "super model" for reuse, such as the component base class model and the connector template model.

[0098] (4) Establishing basic models: The basic model is the smallest construction unit in the power flow calculation system model library. The basic model can be connected to build the upper-level model, while the component model is usually composed of more general basic models. The principle of dividing the basic model and the component model is to start with a simple model and gradually increase the complexity of the model according to needs. The main basic models of the power flow calculation system model library are the interface model, component model and single-machine equipment model. The interface model represents the input and output characteristics of each component and the transmission relationship between components. The component model represents the characteristics of the actual physical element or equipment. The single-machine model represents the electrical properties of the actual physical equipment in the power flow calculation system.

[0099] (5) Design connectors: Components communicate with other components or the outside world through connectors. In this stage, all connectors of the power flow calculation system model need to be designed and a set of reasonable connector variables need to be determined. Connectors should make component connections simple and natural. For connectors of physical component models, it must be ensured that component connections can be physically realized. There are four types of connectors in the power flow calculation system model, such as Figure 6 As shown: electrical connectors, thermal connectors, translational mechanical connectors, and rotational mechanical connectors. Connector variables are divided into two types, namely flow variables and potential variables. Connectors of the same type can be freely connected as needed. Flow variables and potential variables obey generalized Kirchhoff's laws. Connections will generate non-causal connection equations without specifying the order of solution.

[0100] (6) Establish component model: At this point, the foundation for establishing the component model of the power flow calculation system has been laid, including basic models, connectors, and modeling methods. Each component model of the power flow calculation system is established separately using an object-oriented declarative modeling method and is independent of the external environment. First, the physical model of the component is converted into a mathematical model expressed in equations, and then the mathematical model is converted into a reasonable numerical model. Given reasonable boundary conditions and initial values, the numerical model can be used for direct simulation. Finally, the numerical model is implemented using the Modelica language to obtain the component model. Each mathematical equation of the component model is independently written in the most natural form, without the need to specify the input and output variables and the order in which the equations are solved, and has non-causal characteristics. The equations are kept as consistent as possible with the form in books and literature to ensure readability and knowledge accumulation. Subsequently, models of all components are established one by one, and the models are managed in a model library through a certain classification method, as shown below. Figure 7 The power grid flow simulation calculation system model library shown.

[0101] The component model needs to be connected to the system model for simulation, and the simulation results of the component are compared with the expected theoretical results. If the two are consistent, it means that the component model is verified; if the two are inconsistent, the component model needs to be modified and improved until the component model meets the requirements.

[0102] (7) Establishing a system model: According to the topological structure of the power system, the component models are combined and connected to establish a practical power flow calculation system model and conduct simulation research on it. Figure 8 The figure shows the power flow calculation system model. The simulation results are compared with the expected theoretical characteristics of the system, and the system model is adjusted according to the simulation results until it meets the theoretical requirements.

[0103] (8) Conduct simulation analysis: After the system model is verified, relevant simulation analysis can be carried out according to the task requirements of the power grid flow calculation system to obtain the required information and knowledge through the model.

[0104] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for calculating power flow based on Modelica, characterized in that: include: According to the topological structure of the real power grid power flow system, multiple power flow calculation system sub-models are obtained; According to the plurality of power flow calculation system sub-models, a basic model library is established, wherein the basic model library includes: an interface model, a component model, a single-machine equipment model, and a system model; The interface model is used as the input and output characteristics of each component itself and the transmission relationship between components; The component model is used as the actual physical element or device's own characteristics, The stand-alone device model is used as the electrical properties of the actual physical device in the power flow calculation system; Connecting the interface model, the component model, and the stand-alone device model according to a preset modeling method according to a preset connector; According to a preset connector, the interface model, the component model, and the stand-alone equipment model are connected according to a preset modeling method to establish a power flow calculation simulation system, wherein the power flow calculation simulation system is obtained by simulating the real power grid power flow system based on Modelica; According to the task requirements of the power grid power flow calculation simulation system, power grid power flow simulation calculation is carried out.

2. The method according to claim 1, characterized in that According to the plurality of power flow calculation system sub-models, a basic model library is established, wherein the basic model library includes: an interface model, a component model, a single-machine equipment model, and a system model, including: The component model of the basic model library is decomposed into: generator component, transformer component, transmission line component, load component and corresponding component data.

3. The method according to claim 2, characterized in that The preset connector is obtained as follows: The connectors of the power flow calculation simulation system include: an electrical connector, a thermal connector, a translational mechanical connector and a rotational mechanical connector, and the variables of the connectors include flow variables and potential variables.

4. The method according to claim 1, characterized in that: According to the plurality of power flow calculation system sub-models, a basic model library is established, wherein the basic model library includes: an interface model, a component model, a single-machine equipment model, and a system model, including: Each component model of the power flow calculation simulation system is independently established using an object-oriented declarative modeling method; Converting the physical model of the component model into a mathematical model expressed in equations, and converting the mathematical model into a numerical model; Based on boundary conditions and initial values, the numerical model is used for simulation; The numerical model is implemented using Modelica language to obtain a component model; The component model is connected to the system model for simulation. If the two are consistent, the component model is verified.

5. The method according to claim 1, characterized in that The multiple power flow calculation system sub-models are obtained by decomposing the topological structure of the real power grid power flow system, including: Based on data abstraction, interface separation, and modular preset processing solutions, multiple power flow calculation system sub-models are obtained according to the topological structure of the real power grid power flow system. The data abstraction is used to extract the common features in the model and express them using an abstract model; The interface separation is used to model different components separately from the device model and declare component properties during model instantiation; The modularization includes: a power flow calculation simulation system interface model, various component models and a power flow calculation system model.

6. The method according to claim 1, characterized in that The power grid flow simulation calculation is performed according to the task requirements of the power grid flow calculation simulation system, including: Based on the established Modelica power flow calculation simulation system, power flow simulation calculation is performed, and according to the preset power grid architecture and given network parameters and component parameters, the component model combination is used to build the current power flow calculation simulation system, wherein the components are connected by connectors, and the voltage and current balance equations are established in the system through the connection relationship of the connectors.

7. A power grid flow calculation device based on Modelica, characterized in that: include: A splitting module is used to decompose multiple power flow calculation system sub-models according to the topological structure of the real power grid power flow system; A basic model module, used to establish a basic model library according to the multiple power flow calculation system sub-models, wherein the basic model library includes: an interface model, a component model, a single-machine equipment model, and a system model; The interface model is used as the input and output characteristics of each component itself and the transmission relationship between components; The component model is used as the actual physical element or device's own characteristics, The stand-alone device model is used as the electrical properties of the actual physical device in the power flow calculation system; Connecting the interface model, the component model, and the stand-alone device model according to a preset modeling method according to a preset connector; A simulation module, used to connect the interface model, the component model, and the stand-alone equipment model according to a preset modeling method according to a preset connector to establish a power flow calculation simulation system, wherein the power flow calculation simulation system is obtained by simulating the real power grid power flow system based on Modelica; The calculation module is used to perform power flow simulation calculation according to the task requirements of the power flow calculation simulation system.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 6 when executed.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dynamic analysis method for spacecraft propulsion system based on Modelica model

    CN107357961A

  • Three-phase power flow processing method comprising electric heating equipment

    CN111082426A