Digital twinborn monitoring system for operation condition of direct current micro-grid
By using digital twin technology in the microgrid control system, real-time monitoring and evaluation of the voltage and current physical quantity of the microgrid, the problems of long design cycles and potential design defects in the existing technology are solved, and a more efficient and accurate control system design is achieved.
Patent Information
- Application Number
- CN202510386685.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-31
AI Technical Summary
When designing microgrid control systems, the prior art faces a large number of parameters to be identified and dynamic equations of unmodeled dynamics, resulting in a long design cycle, a large amount of manpower and material resources, and potential design defects may lead to damage to electrical components.
Digital twin technology is used to establish a digital twin system for DC microgrid. The voltage and current physical quantity of the microgrid are monitored in real time through the digital layer and the service layer, the effect of the control algorithm is evaluated, and the trial operation is carried out in the digital space, shortening the time-consuming of simulation and physical verification.
It greatly shortens the time-consuming of simulation and physical verification, avoids property losses caused by improper design, and improves the efficiency and accuracy of control system design.
Smart Images

Figure CN119891564A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of microgrid monitoring, and in particular to a digital twin monitoring system for the operating status of a direct current microgrid. Background Art
[0002] When designing a control system in the microgrid field, the main control target is the output voltage and current of each microgrid node. Excellent microgrid control algorithms often have features such as power balance and voltage and current coordinated control. Therefore, voltage and current are important indicators that characterize the quality of a microgrid control system. Monitoring and examining the voltage and current physical quantities of a microgrid is an important part of designing a control system.
[0003] The existing traditional power system is generally expressed in various algebraic, differential or partial differential forms of dynamic equations. Faced with dynamic equations with a large number of parameters to be identified and unmodeled dynamics, the traditional control system design based on this often requires simulation and multiple rounds of physical verification, which leads to a long design cycle and consumes a lot of manpower and material resources. If there are potential defects in the system design, it is easy to damage electrical components and cause property losses.
[0004] In view of the above difficulties, the present invention considers establishing a digital twin system of the DC microgrid when studying the DC microgrid control algorithm, which is responsible for monitoring and examining the voltage and current physical quantities of the microgrid to evaluate the effect of the control algorithm. When designing the control algorithm, by building a digital twin model, a trial run can be carried out in the digital space. In the digital space, thanks to the running speed of the program, the time consumption of simulation and physical verification is greatly shortened. For potential design defects, the control algorithm is verified by the "virtual-real mapping" technology in the digital space, avoiding property losses caused by improper design.
[0005] Digital twin refers to the technology of copying all elements, processes, dynamics and firmware of real physical systems into digital bodies. The two systems exist in parallel, share all inputs and operations, and use real-time data communication and information transmission to achieve "virtual-real mapping". In the design and optimization of control systems, digital twin systems can provide seamless monitoring, analysis, evaluation and prediction, and achieve synchronous and consistent operation of physical and digital bodies. At the same time, digital twin systems can easily integrate optimization learning, data analysis, state prediction, visualization, etc. in digital space, reflecting the entire life cycle of the entity, and providing more convenience for the development and maintenance of physical systems.
[0006] "Virtual-reality mapping" refers to two-way communication between the digital body and the physical body. The digital body monitors, analyzes, evaluates and predicts in real time, while the physical body can respond to operations in the digital space in real time, achieving synchronous and consistent operation of the physical and digital bodies, and facilitating the optimization of control algorithms. Summary of the invention
[0007] In order to solve the above technical problems, the present invention proposes a digital twin monitoring system for the operation status of a DC microgrid, comprising: a physical layer, a digital layer and a service layer, a communication connection layer and a data layer; The physical layer is the microgrid physical platform; The digital layer and service layer, with the Unity platform as the main body, conducts physical modeling of the microgrid physical platform through digital twin technology to obtain the microgrid physical model, maps the microgrid physical model into the digital space as a digital twin, and monitors the data of the microgrid physical platform in real time; The data layer uses the Stm32 microcontroller board to calculate the voltage and current control quantities of the microgrid physical platform; The communication connection layer connects the microgrid physical platform with the Stm32 microcontroller board in the data layer through the CAN bus, and connects the Stm32 microcontroller board with the Unity platform through a serial port line.
[0008] In a preferred embodiment, the application scenarios of the digital twin system are distinguished as follows: Scenario 1: Connect to the existing physical microgrid platform. The physical microgrid platform is directly used as the physical layer. The digital twin system does not need to perform physical modeling of the microgrid. The control algorithm is designed on the Stm32 microcontroller board. Data is exchanged with the physical microgrid platform through the communication connection layer. The voltage and current data and control parameters are displayed on the computer. The control quantity instructions are modified through the graphical user interface. Scenario 2: Without connecting to the existing physical microgrid platform, a microgrid physical model is established for the physical microgrid platform. The dynamic equations are established by monitoring the data of the microgrid nodes and converted into state space equations.
[0009] In a preferred embodiment, for a microgrid physical model with four microgrid nodes, each microgrid node includes a controller, a distributed power source, a load, and a wire, and two microgrid nodes are connected. and The resistance of the power line is , admittance ; If the microgrid node and If not directly connected, ; Output voltage in each microgrid node The initial value is known, the output current , control amount , inverter output voltage The initial value is 0; Directly use the inverter output voltage As the control input of the microgrid node converter, it is obtained: ; ; In the formula, r i is the shunt resistor, is the current flowing through the shunt resistor, I is the current vector output by the microgrid node, ; is the voltage vector output by the microgrid node, ; is the admittance matrix, .
[0010] In a preferred embodiment, algebraic transformation is performed according to Kirchhoff's law to obtain the voltage V and current I output by the microgrid physical model. t : ; Among them, the N-order unit matrix , the droop coefficient matrix , Represents the per-unit current value of the distributed power source, the equivalent admittance matrix , the converter output voltage, which can be equivalent to the control input .
[0011] In a preferred embodiment, a current sharing and voltage regulation controller is used: ; In the formula, is the control input; is the virtual voltage; It is a compromise variable for adjusting the degree of current sharing and voltage regulation; is the node output voltage; is the Laplace matrix of the microgrid node network; For virtual leaders to The edge weight matrix of each microgrid node, is the reference voltage.
[0012] In a preferred embodiment, the discretized voltage and current expressions are as follows: ; in, is the voltage at step i+1, is the current of step i+1, is the N-order identity matrix, is the droop coefficient matrix, Represents the per-unit current value of the distributed power source, the equivalent admittance matrix , is the control input for the i+1th step.
[0013] In a preferred embodiment, the discrete form of the controller is as follows: ; In the formula, is the control input for step i+1; is the virtual voltage of the i+1th step; is the node output voltage at the i-th step.
[0014] In a preferred embodiment, the discrete form equations of the controller are converted into a C language program and burned into the Stm32 microcontroller board, which interacts with the microgrid physical platform and digital space through the communication connection layer.
[0015] In a preferred embodiment, voltage and current data are monitored in real time on a computer, and voltage and current control of the microgrid physical platform is achieved by changing the control quantity.
[0016] In a preferred embodiment, the communication connection layer contains a CAN communication protocol and a UART serial communication protocol. Each frame needs to transmit and read nine data, including 1 time data, 4 current data and 4 voltage data.
[0017] Compared with the prior art, the present invention has the following beneficial technical effects: First, in the face of dynamic equations with a large number of parameters to be identified and unmodeled dynamics, traditional control system design often requires simulation and multiple rounds of physical verification, and continuous monitoring of voltage, current and other data during simulation and physical verification, which leads to a long design cycle and wastes manpower and material resources. Traditional methods take up a lot of time and energy in the design of power system control algorithms. In the monitoring scheme based on the digital twin system, thanks to the technical concept of "virtual-real mapping", in the digital space, whether it is dSPACE or Stm32, the microgrid nodes are implemented through program logic simulation, which leads to the steady-state time and convergence speed of the algorithm output microgrid node voltage and microgrid node current depending on the speed of code execution, and the result is much faster than the actual experiment. Therefore, when studying the DC microgrid control algorithm, the present invention greatly shortens the time consumption of simulation and physical verification.
[0018] Second, poor control system design will cause abnormal voltage and current monitoring results. For example, when the voltage is too large, this will cause the distributed power supply of the microgrid node to output at full load for a long time and exceed the sensor range, which will cause certain damage to physical assets such as power supplies, transmission lines, and sensors. Therefore, when the monitoring results are abnormal, the microgrid platform must be stopped, and the electrical components that may be damaged must be checked and replaced one by one. In addition, the stability of the control system needs to be re-verified, the control parameters that cause system instability must be corrected, and multiple rounds of physical simulation verification must be re-performed. In the digital twin system, "digital assets" are used to replace physical assets in reality. For potential control system design defects, the "virtual-real mapping" technology is used to verify them in the digital space built on the Unity platform, avoiding property losses caused by improper design. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a framework diagram of the software and hardware platform of the present invention; Figure 2 It is a hierarchical interaction logic diagram of the digital twin monitoring system of the present invention; Figure 3 This is a comparison diagram of the actual object rendered in the present invention; Figure 4 Importing the Unity platform renderings for the model of the present invention; Figure 5 Data visualization and graphical user interface for the present invention; Figure 6 This is an example diagram of a single microgrid node model of the present invention; Figure 7 This is an example diagram of a four-microgrid node model of the present invention; Figure 8 A schematic diagram of a transmission data packet of the present invention; Fig. 9 It is a schematic diagram of CAN communication of the present invention; Fig.10 Schematic diagram of the experimental platform of the present invention. DETAILED DESCRIPTION
[0020] The technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0021] 1. System overall framework The overall hardware and software platform framework of the digital twin system of the present invention is as follows: Figure 1As shown: Use the Unity platform as the building and display platform, the Stm32 microcontroller board as the controller, and use the Blender modeling software to measure and model physical entities such as voltage sources, voltage / current sensors, and map them to the Unity platform.
[0022] Use CAN and serial communication to sense voltage, current and other data, develop game components through C# scripts and real-time data, map entity characteristics, drive digital entities in the Unity platform, and store data in the database developed by SQLite. It is divided into three parts: 1. Digital layer and service layer based on the Unity platform; 2. Communication connection layer dominated by serial ports and CAN; 3. Data layer managed by SQLite.
[0023] Based on the digital layer and service layer, communication connection layer, data layer mentioned above, plus the physical microgrid platform as the physical layer, the digital twin platform framework composed of Unity platform, SQlite, Stm32 and other hardware and software integration can be abstracted into Figure 2 The system framework shown: The hierarchical interaction logic of the digital twin monitoring system is composed of Figure 2 As shown in the figure, the construction method and main functions of each level are as follows: 2. Digital Layer and Service Layer The main function of the digital layer is to complete the real-time mapping of physical objects. The key to achieving this goal lies in the accurate modeling of physical entities, including: geometric models and physical models.
[0024] The geometric model focuses on the size of the physical entity, the number of firmware, the communication topology, etc., while the physical model focuses on the response characteristics, physical constraints, etc. of the physical entity.
[0025] The service layer achieves seamless monitoring, analysis, evaluation and prediction through physical property modeling and data-driven approaches, and ultimately provides real-time control, data monitoring, algorithm verification and other services.
[0026] In order to ensure the intuitive presentation of the digital twin platform and reflect the rendering function of the Unity platform, in the digital twin system built by the Unity platform for the physical microgrid, as the basis of the interactive interface and also one of the requirements of "virtual-real mapping", it is necessary to first model the physical entity in reality and map it into the digital space as a digital twin. Compared with other modeling software, Blender has rich software resources, covers the entire process, has strong scalability, and is highly compatible with the Unity platform.
[0027] The basic process of Blender software modeling is as follows: (1) On-site measurement: Ensure accurate recording of physical dimensions, proportions, colors, and other physical features of the microgrid platform, and take clear photos for reference.
[0028] (2) Modeling: Use tools in Blender software, such as stretching and lofting, to model the physical object based on the measured data, ensuring that the model’s proportions are accurate and that it conforms to the outline and shape of the physical object as closely as possible.
[0029] (3) Material application: Different materials are applied to the model according to the material characteristics of the real object, and the color is adjusted to make it as close to the real object as possible. If necessary, textures can be added to enhance the sense of reality, such as metal, plastic, etc.
[0030] (4) Mapping: For models that require more refinement, you can map the model surface based on the three views of the real object to achieve a better restoration effect. Make sure that the scale and position of the map are consistent with the real object to ensure the clarity and realism of the map.
[0031] (5) Rendering and exporting: Set the camera position and angle in Blender, make appropriate adjustments and render the model, and then render it. Finally, export the rendered model as a .fbx file so that it can be imported into the Unity platform for use.
[0032] According to the above process, the dSPACE platform, pure resistive load, oscilloscope, DC power supply, voltage sensor, current sensor and other entities are modeled in Blender software and exported in .fbx format. Some renderings are compared with the actual objects as shown below. Figure 3 As shown: Import the model into Unity, add basic Camera and Directional Light components, and get a rough digital space. The display effect is as follows: Figure 4 As shown: Considering that users need to interact with the digital space, the next step is to mount the C# script file on the model in the Unity platform.
[0033] Taking voltage and current sensors as an example, in order to facilitate the interaction between the user cursor and the sensor, you first need to add a collision detection component Box Collider to the model, and then add a C# script, which uses the functions OnMouseOver(), OnMouseExit() and the collision detection component Box Collider to determine the relative position relationship between the cursor and the digital twin in the digital space.
[0034] After achieving normal interaction between the cursor and the model, the next step is to implement two major functions in the digital space: data visualization and graphical user interface design: (1) Data visualization In the digital twin system, data visualization is very important. The present invention uses the third-party resource Xcharts to complete the data visualization presentation. In the resource library Xcharts, the LineChart class is used to create a line chart.
[0035] In the specific C# script writing process, since the Xcharts chart is part of the UI component in the Unity platform, the process of reading chart data, drawing charts, chart interaction, etc. designed to operate the UI component must be located in the main thread. In order to improve the real-time performance of drawing, the present invention puts the functions that affect the performance of the main thread, such as serial port communication, data processing, and data storage, into the sub-thread for operation.
[0036] (2) Graphical User Interface Design the human-computer interaction interface, namely the graphical user interface (GUI). After summary and analysis, its interface should meet the following requirements: it can display real-time data and historical data of the operating status; it can switch the data display method through cursor interaction.
[0037] Data visualization and graphical user interfaces such as Figure 5 As shown in the graphical user interface, Voltage_1-4 and Current_1-4 in the upper left corner can display the voltage and current values of the current microgrid physical platform in real time; the function keys Chart_Show and Chart_hide indicate displaying and hiding data curves; the function key Replay_History indicates playback of specified historical operating states; the slider theta indicates control parameters, and the chart in the center of the screen is a data visualization function based on the resource library Xcharts.
[0038] The present invention has completed the Blender modeling and interactive function development, but the key to the "virtual-real mapping" technology is the physical modeling of the microgrid platform. Next, we will introduce how to achieve "virtual-real mapping". First, we need to distinguish the application scenarios of the digital twin system: Scenario 1: Connect to the existing physical microgrid platform. In this case, the physical microgrid platform directly serves as the physical layer, and the digital twin system does not need to perform physical modeling of the microgrid. It is only necessary to design the control algorithm on the Stm32 microcontroller board, which interacts with the physical platform through the communication connection layer and displays physical quantities such as voltage and current data and control parameters on the computer. The computer terminal modifies the control quantity and other instructions through the graphical user interface.
[0039] Scenario 2: Not connected to the existing physical microgrid platform. Compared with Scenario 1, the digital twin system needs to perform physical modeling of the physical microgrid platform. That is, the system's dynamic equations of voltage and current are obtained through electrical components such as capacitors and inductors at the microgrid nodes, and converted into the form of state space equations.
[0040] Take a microgrid physical platform as an example for physical modeling. In this scenario, dSPACE (compact laboratory system, semi-physical simulation platform) is used as the physical layer. Consider a general DC microgrid, where the load is represented by constant impedance, and simplify the network into a microgrid with 4 microgrid nodes, where each microgrid node contains a controller, distributed power supply, load, wires, etc. Here, the wires are modeled as pure resistance. Connect two microgrid nodes in the microgrid and Power line resistors It means that the related admittance If the microgrid node and If not directly connected, , see the schematic diagram Figure 6 .
[0041] In the figure: : resistance between microgrid nodes; : microgrid node output voltage; : microgrid node output current; : load resistance; : Shunt resistance; : control signal; : Converter output voltage. Output voltage in each microgrid node The initial value is known, the output current , control amount , inverter output voltage The initial value is 0. Directly use As the control input of the microgrid node converter, see Figure 7 .
[0042] Depend on Figure 6 It can be concluded that , combined with Figure 6 You can get: ; In the formula, is the microgrid node output current vector, ; is the microgrid node output voltage vector, ; is the admittance matrix, .
[0043] Then, according to Kirchhoff's law, the output voltage and current expression of the system can be obtained by algebraic transformation: ; Droop coefficient matrix , the equivalent admittance matrix For the above theoretical model, a current and voltage regulation controller is cited here ; In the formula, is the virtual voltage; It is a compromise variable for adjusting the degree of current sharing and voltage regulation; is the Laplace matrix of the microgrid node network; For virtual leaders to The edge weight matrix of each microgrid node, is the reference voltage.
[0044] Considering that the simulation and experiment in the simulation software and Stm32 platform are discrete, the output voltage and current expressions and the voltage and current controllers need to be discretized. The discretized voltage and current expressions are as follows: ; The discrete form of the controller is as follows: ; So far, the theoretical model of the microgrid platform and its controller have been obtained. First, build the theoretical model in Simulink and download the model in Simulink to dSPACE. dSPACE will act as a physical platform and interact with Stm32 and the computer through the communication connection layer. For the controller, its discrete form equation needs to be converted into a C language program and burned into the Stm32 microcontroller board, which also interacts with the physical platform and the computer through the communication connection layer.
[0045] Through the description of the above two scenarios, the present invention has completed the physical layer modeling of the microgrid physical platform in dSPACE and Stm32, and with the digital layer and service layer developed on the computer based on the Unity platform, the digital twin system has taken shape. Next, the communication connection layer and data layer supporting the system are introduced.
[0046] 3. Communication Connection Layer The communication connection layer is responsible for establishing and managing the communication connections between the various components within the digital twin system to ensure smooth data transmission and exchange. This layer includes the design of the communication protocol, the format definition of the data packet, the stability of data transmission, and other aspects.
[0047] In the application, the digital twin system is used as the host computer, and the microcontrollers such as single-chip microcomputers and the physical microgrid platform are used as the slave computers. The communication connection of the system mainly includes the computer communicating with the microcontroller through the serial port protocol, and the microcontroller communicating with the physical microgrid through the CAN protocol.
[0048] The serial data packet is defined in the microgrid physical platform, which contains four Hall voltage sensors and four Hall current sensors. The microgrid node controller uses the Stm32 microcontroller and the communication protocol uses the UART serial communication protocol. To ensure the integrity and real-time performance of the data, a total of nine data need to be transmitted and read per frame, so the data packet is defined as follows: Figure 8 shown.
[0049] In the figure, the packet header and the packet tail both represent the tag data with a memory size of a single byte, which is used as the flag bit for the host computer to receive the complete data packet. The data bits contain a total of 1 time data, 4 current data, and 4 voltage data. Each data represents a floating point number of type float with a length of 4 bytes. In addition, the transmission data also contains necessary separation bits, such as space characters, line feed characters, etc. In summary, the complete data packet contains a total of 86 bytes.
[0050] CAN data packaging takes into account the need to implement microgrid control algorithms in the physical platform, and the microgrid platform has multiple distributed microgrid nodes, so topological communication between multiple microgrid nodes and controllers in the platform is inevitable. For the commonly used UART communication protocol, it mainly meets the needs of point-to-point communication. If the UART protocol is used, each microgrid node in the platform will waste a lot of hardware resources and electrical interfaces to meet the needs of simultaneous communication of multiple microgrid nodes, and the UART anti-interference ability is weak.
[0051] CAN communication supports a variety of topologies and communication modes, and can flexibly respond to different application requirements. For the multi-microgrid node communication requirements mentioned above, CAN communication can complete the task of multi-microgrid node communication through a pair of CAN buses, greatly reducing the waste of hardware resources. Thanks to the design of the CAN protocol differential line, CAN communication has excellent anti-interference performance when facing external interference.
[0052] In order to reduce the waste of microcontroller resources in microgrid nodes and enhance anti-interference capabilities, the CAN protocol is used for communication between the physical platform and the controller. See the schematic diagram. Fig. 9 .
[0053] Through the agreed data arrangement and the specified memory address, we can get complete and accurate data. Figure 5It can be known that in the physical platform, the dynamic data such as the physical operation time, the voltage and current of each microgrid node are packaged. The time, voltage and current data types are all floating point numbers (float) occupying 4 bytes in the memory, and the maximum data length that can be sent each time in the standard frame is 8 bytes. Therefore, for the voltage and current data of the same microgrid node, the present invention occupies the upper 4 bytes of the data segment for the voltage data and the lower 4 bytes of the data segment for the current data. The data and address are transmitted in big-endian mode, and each frame is assigned a specific CANID for the receiver to identify.
[0054] 4. Data Layer The data layer is mainly responsible for storing and managing sensor data, historical data, etc. It is an important support for the service layer of the digital twin system. For example, the function key Replay_History in the service layer mentioned above uses the historical data stored in the data layer. The present invention uses SQLite as the database management system. The storage table format is shown in Table 1: Table 1 Data table format
[0055] The database design is based on the needs of the digital twin system, including key information such as microgrid node voltage, microgrid node current, program running time, etc. Each time the digital twin system database SQLite is run, a new table will be created. The table name is automatically numbered and automatically incremented as the number of runs increases, ensuring that the organizational structure of the database is concise and clear, and easy to manage and maintain.
[0056] dSPACE is a microgrid experimental platform, in which all physical microgrid models except the controller are mounted; STM32H743-IIT6 microcontroller board is a microgrid controller, and the controller is discretized by equation (4.5); Unity platform is the host computer, which receives dynamic data transmitted back by the serial port of STM32 microcontroller board.
[0057] In the specific implementation, this solution uses dSPACE (compact laboratory system, semi-physical simulation platform) as the microgrid physical platform, which mounts all physical microgrid models except the controller; the STM32 microcontroller board as the microgrid controller; and the Unity platform as the host computer, which receives the dynamic data transmitted back by the serial port of the STM32 microcontroller board. See the schematic diagram Fig.10 : The implementation steps are as follows: 1. Build a theoretical model of the microgrid physical platform in Simulink.
[0058] 2. Download the model in Simulink to dSPACE's control software ControlDesk.
[0059] 3. Set the data packet format of voltage and current and the interface of control signal in ControlDesk.
[0060] 4. According to the designed control algorithm, write the Stm32 microcontroller board program and output the control signal.
[0061] 5. Connect the Stm32 microcontroller to the microgrid physical platform through the CAN bus, and connect the Stm32 microcontroller to the computer with a serial port cable.
[0062] 6. The Stm32 microcontroller transmits the voltage and current signals to the computer, and the computer transmits the command signal to the Stm32 microcontroller.
[0063] 7. Monitor the voltage and current values of each microgrid node on the computer, issue instructions as needed, and complete data interaction.
[0064] 8. The computer will store the obtained data in the database built by SQLite in real time.
[0065] After completing the above steps, you can see the voltage and current data in real time on the computer, and you can change the voltage and current by changing the control parameters. After the experiment, you will also get a historical data table.
[0066] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. The embodiments should therefore be considered exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A digital twin monitoring system for the operation status of a DC microgrid, characterized in that: include: Physical layer, digital layer and service layer, communication link layer and data layer; The physical layer is the microgrid physical platform; The digital layer and service layer, with the Unity platform as the main body, conducts physical modeling of the microgrid physical platform through digital twin technology to obtain the microgrid physical model, maps the microgrid physical model into the digital space as a digital twin, and monitors the data of the microgrid physical platform in real time; The data layer uses the Stm32 microcontroller board to calculate the voltage and current control quantities of the microgrid physical platform; The communication connection layer connects the microgrid physical platform with the Stm32 microcontroller board in the data layer through the CAN bus, and connects the Stm32 microcontroller board with the Unity platform through a serial port line.
2. The digital twin monitoring system for the operation status of a DC microgrid according to claim 1 is characterized in that: Differentiate the application scenarios of digital twin systems: Scenario 1: Connect to the existing physical microgrid platform. The physical microgrid platform is directly used as the physical layer. The digital twin system does not need to perform physical modeling of the microgrid. The control algorithm is designed on the Stm32 microcontroller board. Data is exchanged with the physical microgrid platform through the communication connection layer. The voltage and current data and control parameters are displayed on the computer. The control quantity instructions are modified through the graphical user interface. Scenario 2: Without connecting to the existing physical microgrid platform, a microgrid physical model is established for the physical microgrid platform. The dynamic equations are established by monitoring the data of the microgrid nodes and converted into state space equations.
3. The digital twin monitoring system for the operation status of a DC microgrid according to claim 2 is characterized in that: For the microgrid physical model with 4 microgrid nodes, each microgrid node contains a controller, a distributed power source, a load, and a wire, connecting two microgrid nodes. and The resistance of the power line is , admittance ; If the microgrid node and If not directly connected, ; Output voltage in each microgrid node The initial value is known, the output current , control amount , inverter output voltage The initial value is 0; Directly use the inverter output voltage As the control input of the microgrid node converter, it is obtained: ; ; In the formula, r i is the shunt resistor, is the current flowing through the shunt resistor, I is the current vector output by the microgrid node, ; is the voltage vector output by the microgrid node, ; is the admittance matrix, .
4. The digital twin monitoring system for the operation status of a DC microgrid according to claim 3 is characterized in that: According to Kirchhoff's law, algebraic transformation is performed to obtain the voltage V and current I output by the microgrid physical model. t : ; Among them, the N-order unit matrix , the droop coefficient matrix , Represents the current per unit value of the distributed power supply, the equivalent admittance matrix , the converter output voltage, which can be equivalent to the control input .
5. The digital twin monitoring system for the operation status of a DC microgrid according to claim 4 is characterized in that: Quote current sharing and voltage regulation controller: ; In the formula, is the control input; is the virtual voltage; It is a compromise variable for adjusting the degree of current sharing and voltage regulation; is the node output voltage; is the Laplace matrix of the microgrid node network; For virtual leaders to The edge weight matrix of each microgrid node, is the reference voltage.
6. The digital twin monitoring system for the operation status of a DC microgrid according to claim 5 is characterized in that: The discretized voltage and current expressions are as follows: ; in, is the voltage at step i+1, is the current of step i+1, is the N-order identity matrix, is the droop coefficient matrix, Represents the per-unit current value of the distributed power source, the equivalent admittance matrix , is the control input for the i+1th step.
7. The digital twin monitoring system for the operation status of a DC microgrid according to claim 6, characterized in that: The discrete form of the controller is as follows: ; In the formula, is the control input for step i+1; is the virtual voltage of the i+1th step; is the node output voltage at the i-th step.
8. The digital twin monitoring system for the operation status of a DC microgrid according to claim 7, characterized in that: The discrete form equations of the controller are converted into C language programs and burned into the Stm32 microcontroller board, which interacts with the microgrid physical platform and digital space through the communication connection layer.
9. The digital twin monitoring system for the operation status of a DC microgrid according to claim 8, characterized in that: The voltage and current data are monitored in real time on the computer, and the voltage and current of the microgrid physical platform are controlled by changing the control quantity.
10. The digital twin monitoring system for the operation status of a DC microgrid according to claim 1, characterized in that: The communication connection layer contains CAN communication protocol and UART serial communication protocol. Each frame needs to transmit and read nine data, including 1 time data, 4 current data and 4 voltage data.
Citation Information
Patent Citations
Digital twin-driven processing quality tracing and dynamic control method and system
CN112488489A
Digital twin modeling and multi-agent coordination control method for intelligent micro-grid
CN113221456A
Power transmission line safety state assessment method based on digital twinning
CN115169931A
Regional power grid digital twinning method and system and storage medium
CN115733244A
Oil reservoir digital twinning construction method and device
CN116523401A