Cloud side-end collaborative microgrid real-time simulation test platform and method

By using a cloud-edge-device collaborative microgrid real-time simulation test platform, the problems of environmental realism and closed-loop trial-and-error mechanism for algorithm and equipment testing and verification in microgrid systems have been solved, enabling efficient and comprehensive testing and evaluation, and improving system reliability and the maturity of intelligent scheduling strategies.

CN121580558APending Publication Date: 2026-02-27XIAN HUICHUAN TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511691170.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-18
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

The testing and verification of existing microgrid system algorithms and equipment suffers from problems such as insufficient realism of the verification environment, lack of a safe and reliable closed-loop trial and error mechanism, limited system functionality, failure to cover the entire R&D process, and incomplete evaluation dimensions.

Method used

Design a cloud-edge-device collaborative microgrid real-time simulation test platform, including a cloud platform, a real-time simulator, and an edge controller. Data interaction and control command transmission are realized through a multi-protocol communication interface subsystem, forming a hardware-in-the-loop test closed loop. The platform integrates a test management and evaluation subsystem, supports multiple industrial communication protocols, and realizes distributed collaborative work of model training, inference, and optimization algorithms.

Benefits of technology

It provides a safe, efficient, and comprehensive R&D and verification environment, which significantly reduces the trial-and-error costs and risks of applying AI algorithms in real systems, improves testing efficiency and system reliability, and accelerates the maturity and implementation of intelligent scheduling strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121580558A_ABST
    Figure CN121580558A_ABST
Patent Text Reader

Abstract

The invention provides a real-time simulation test platform and method for a cloud side-end collaborative microgrid. The real-time simulation test platform comprises a cloud platform, a real-time simulation machine and at least one edge controller, the real-time simulation machine is configured to run a real-time digital twin model of the micro-grid system and simulate real-time dynamic characteristics of the micro-grid system; the real-time simulation machine is connected with the edge controller through the multi-protocol communication interface subsystem, and the multi-protocol communication interface subsystem comprises a protocol interface model library and a protocol switching module; the cloud platform is in communication connection with the edge controller and the real-time simulation machine and is used for deploying and training a prediction model. According to the test platform, a safe, efficient and comprehensive research and development and verification environment is provided for a micro-grid optimization scheduling solution through the flexible system construction capability, the closed-loop test verification capability, the intelligent cloud edge cooperation capability and the automatic test evaluation capability, and the trial and error cost of the AI algorithm applied in a real system is reduced; and closed-loop verification of the cloud edge collaborative intelligent decision process is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of micro-grid, and particularly relates to a cloud-edge-end collaborative micro-grid real-time simulation test platform and method. BACKGROUND

[0002] With the deepening of energy transformation, micro-grid dominated by new energy has become a key path to achieve the "double carbon" goal. Micro-grid integrates photovoltaic, energy storage, flexible load and other various heterogeneous distributed resources, with high operation and control complexity, and puts forward strict requirements for the stability and reliability of energy management algorithm and controller device. In recent years, artificial intelligence technology has shown significant potential in energy prediction and optimal scheduling.

[0003] At present, the test and verification of micro-grid system algorithm and device mainly rely on two types of technical routes: one is pure digital offline simulation, which is based on mathematical model for open loop or simple closed loop test; the second is a monitoring and simulation system driven by digital twin, which supports state monitoring and operation deduction through data mirroring.

[0004] However, the existing method has the problems of insufficient authenticity of verification environment, lack of safe and reliable closed loop trial and error mechanism, single system function, not covering the whole research and development process, and imperfect evaluation dimension in supporting AI algorithm and real controller test. SUMMARY

[0005] In view of the problems existing in the prior art, the present application discloses a cloud-edge-end collaborative micro-grid real-time simulation test platform and method.

[0006] The purpose of the present application is achieved by the following technical solutions: On the one hand, the present application aims to provide a cloud-edge-end collaborative micro-grid real-time simulation test platform, comprising: a cloud platform, a real-time simulation machine and at least one edge controller; The real-time simulation machine is configured to run a real-time digital twin model of the micro-grid system, simulating the real-time dynamic characteristics of the micro-grid system; The real-time simulation machine is connected to the edge controller through a multi-protocol communication interface subsystem, for realizing data interaction and control instruction transmission between the real-time digital twin model and the edge controller, forming a hardware-in-the-loop test closed loop; The multi-protocol communication interface subsystem comprises a protocol interface model library and a protocol switching module; The protocol interface model library is pre-provisioned with software interface models supporting multiple industrial communication protocols; The protocol switching module is connected to the protocol interface model library, for receiving external protocol selection instructions, and activating the corresponding software interface model based on the protocol selection instructions while disabling other software interface models; The cloud platform is in communication connection with the edge controller and the real-time simulation machine respectively, and is used for deploying and training a prediction model, and receiving real-time state data from the digital twin model.

[0007] Further, the plurality of industrial communication protocols include, but are not limited to, at least two of Modbus TCP / RTU, IEC 61850 and EtherCAT.

[0008] Further, the protocol switching module receives the protocol selection instruction through a configurable software variable, different values of the software variable correspond to a specific communication protocol respectively; the protocol switching module automatically completes the switching of the underlying communication configuration by changing the current value of the software variable in response to the protocol selection instruction, so as to realize the switching between different communication protocols.

[0009] Further, the test platform of the application further comprises a test management and evaluation subsystem, which comprises: a test case library, which is pre-provisioned with parameterized standard test scenario scripts; a test case injection interface, which is configured to be able to dynamically inject the standard test scenario scripts selected by the user or the test scenario scripts customized by the user during the running of the real-time digital twin model; a data recording and analysis module, which is used to automatically trigger data recording after the test case injection, and automatically generate the evaluation report based on predefined performance indicators, including control performance indicators, economic indicators, communication delay indicators and AI algorithm convergence indicators.

[0010] Further, a distributed collaborative architecture is adopted between the cloud platform and the edge controller, comprising: a model training module, which is deployed on the cloud platform, and is used to train a prediction model by using historical data and real-time state data from the digital twin model; a model inference module, which is deployed on the cloud platform and / or the edge controller, and is connected with the model training module, and is used to load the trained prediction model and perform an inference task to output a prediction result; an optimization algorithm module, which is deployed on the cloud platform and / or the edge controller, and is connected with the model inference module, and is capable of generating an optimization scheduling instruction according to the prediction result of the model inference module; The model training module, the model inference module and the optimization algorithm module can be independently run or freely combined to constitute different cloud-edge collaborative workflows.

[0011] On the other hand, the application aims to provide a microgrid optimization scheduling test method based on the test platform of any one of the above, comprising the following steps: running a real-time digital twin model of a microgrid system in the real-time simulator; Based on the communication protocol actually used by the edge controller, the corresponding communication protocol is configured through the multi-protocol communication interface subsystem to complete the point table mapping between the real-time simulator and the edge controller, forming a hardware-in-the-loop test closed loop; The cloud platform collects real-time state data from the digital twin model, processes the real-time state data in time granularity and standardization, and stores it in the database. The real-time state data includes real-time power generation data and load power consumption data. The cloud platform calls the historical data in the database to execute a prediction model training task and generate a corresponding prediction model. The prediction model includes a power generation prediction model and a load power consumption prediction model. Based on the power generation prediction model and the load power consumption prediction model, through the cooperative working mechanism of the cloud platform and the edge controller, the closed-loop test of the microgrid optimization scheduling algorithm is executed, and the prediction model is dynamically corrected according to the real-time state data fed back by the digital twin model.

[0012] Further, based on the power generation prediction model and the load power consumption prediction model, through the cooperative working mechanism of the cloud platform and the edge controller, the closed-loop test of the microgrid optimization scheduling algorithm is executed, and the prediction model is dynamically corrected according to the real-time state data fed back by the digital twin model. The steps include: The inference module loads the power generation prediction model and the load power consumption prediction model, combines the historical data in the database within a specific time window before the current time, executes inference calculation, and outputs the power generation power prediction value and the load power consumption power prediction value in the future preset period; The optimization module receives the power generation power prediction value and the load power consumption power prediction value, runs a preset optimization algorithm, generates system optimization scheduling instructions, and issues the optimization scheduling instructions to the edge controller. The optimization scheduling instructions include power limiting instructions for the power generation system and charge-discharge instructions for the energy storage system. The edge controller receives the optimization scheduling instructions, integrates the local control strategy running internally, generates device-level control instructions, and issues the device-level control instructions to the real-time simulator. The device-level control instructions include the target value of the charge-discharge power of the energy storage system, the power limiting value of the power generation system, and the control value of the load power consumption power. The real-time simulator executes the received device-level control instructions, collects real-time state data of the digital twin model, and uploads the real-time state data to the edge controller and the cloud platform. The cloud platform updates and corrects the power generation power prediction model and the load power consumption power prediction model based on the real-time state data uploaded by the real-time simulator.

[0013] Further, the test method of the present application further comprises a test evaluation and optimization step: The test management and evaluation subsystem injects test cases into the real-time digital twin model; The real-time digital twin model generates real-time state data in response to the test cases and outputs the real-time state data to the edge controller and cloud platform; The edge controller runs a control algorithm based on the received real-time state data to generate control instructions and issues control instructions to the real-time digital twin model to perform closed-loop test operation; The cloud platform performs model training based on the received real-time state data, and updates and corrects the power generation prediction model and load power consumption prediction model online; The test management and evaluation subsystem automatically records the state data throughout the process and generates a performance evaluation report for the control algorithm based on predefined evaluation indicators.

[0014] Further, after the step of updating and correcting the power generation prediction model and load power consumption prediction model online, the step of issuing the updated and corrected prediction model to the edge controller is further included, which specifically comprises: The cloud platform establishes communication with the edge controller and automatically obtains model format information supported by the edge controller; The cloud platform converts the trained prediction model into a target format file compatible with the edge controller according to the model format information, and issues the converted model file to the edge controller.

[0015] Further, after the step of the test management and evaluation subsystem automatically recording the state data throughout the process and generating a performance evaluation report for the control algorithm based on predefined evaluation indicators, the step of: The test management and evaluation subsystem feeds back the evaluation results in the performance evaluation report to the cloud platform; The cloud platform performs parameter tuning and model retraining on the power generation prediction model, load power consumption prediction model, and optimization algorithm based on the evaluation results.

[0016] Compared with the prior art, the beneficial effects of the application are that the application platform provides a safe, efficient and comprehensive R&D and verification environment for micro-grid optimization scheduling solutions through its flexible system construction capability, closed-loop test verification capability, intelligent cloud-edge collaboration capability and automatic test evaluation capability, significantly reduces the trial-and-error cost and risk of AI algorithm application in real systems, improves test efficiency and system reliability, accelerates the maturity and landing of intelligent scheduling strategies, and realizes closed-loop verification of cloud-edge collaborative intelligent decision-making process. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 The architecture schematic diagram of the cloud-edge-end collaborative micro-grid real-time simulation test platform of the application is shown. Figure 2 The hardware-in-the-loop connection and data flow schematic diagram of the real-time simulation machine and the edge controller of the application is shown. Figure 3 The main flowchart of the cloud-edge-end collaborative micro-grid optimization scheduling test method of the application is shown. Figure 4 The specific implementation flowchart of the cloud-edge-end collaborative micro-grid optimization scheduling test method of the application is shown. Figure 5 The flowchart of the automatic closed-loop test of the test management and evaluation subsystem of the application is shown. DETAILED DESCRIPTION

[0018] The technical solutions of the application will be described clearly and completely below with reference to the drawings. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the application.

[0019] In the description of the application, it should be noted that the orientations or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the application and simplifying the description, and therefore cannot be understood as indicating or implying that the devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the application. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.

[0020] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connecting" should be understood broadly, for example, it can be fixed connection, or detachable connection, or integrally connected; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or the internal communication of two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances. In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.

[0021] Embodiment 1 In combination Figure 1 As shown in the embodiment, the cloud edge end collaborative microgrid real-time simulation test platform is provided, which comprises a cloud platform deployed on a remote server, a real-time simulator and a plurality of edge controllers. The real-time simulator runs a real-time digital twin model of the microgrid system, which accurately simulates the real-time dynamic operating characteristics of key components such as power grid, energy storage system, photovoltaic system, diesel generator system and load. The model adopts a modular modeling method, and all component models support flexible configuration and reuse, effectively ensuring modeling efficiency and system consistency. It is particularly noted that the calculation step of the real-time digital twin model supports a configurable range from microseconds to milliseconds, which can simultaneously simulate the electromagnetic transient process and the electromechanical transient process of the power system, providing a high-fidelity test environment for control algorithm verification.

[0022] The edge controller is composed of one or more real industrial controllers, including but not limited to programmable logic controller (PLC), industrial personal computer (IPC) or dedicated energy management system (EMS) controller, etc., specifically covering microgrid controller, energy storage unit controller, photovoltaic unit controller, load unit controller, etc. These controllers are connected with the real-time simulator through physical interfaces, receive the operating data output by the real-time simulator, execute the built-in control algorithm or AI inference model, and return the generated control instructions to the real-time simulator, thereby forming a complete hardware-in-the-loop test closed loop. This architecture ensures high consistency between the test environment and the actual operating environment, providing a reliable test basis for control strategy verification.

[0023] The cloud platform and the edge controller adopt a distributed collaborative architecture, integrating three core functional modules of model training module, model inference module and optimization algorithm module. The architecture realizes data interaction between modules through standardized interface protocol, supports independent operation of each module or flexible combination according to actual needs, forming different cloud edge collaborative workflows.

[0024] Specifically, the model training module is deployed on the cloud platform and is responsible for training the prediction model using historical data and real-time state data from the digital twin model; the model inference module and the optimization algorithm module can be flexibly deployed on the cloud platform or the edge controller according to the actual application scene requirements. Among them, the model inference module and the model training module work cooperatively, and are responsible for loading the trained prediction model and performing inference tasks, and outputting inference results; the optimization algorithm module is connected with the model inference module, generates optimization scheduling instructions based on the inference results, and guides the decision-making process of the edge controller. Based on the above distributed collaborative architecture, the application provides three flexible cloud-edge collaborative implementation paths: Path ① adopts a "cloud training-cloud inference-cloud optimization" mode, and all computationally intensive tasks are completed in the cloud. The cloud platform is responsible for model training, prediction inference and optimization calculation, and the edge controller mainly performs real-time control functions. It is suitable for scenarios with relatively low real-time requirements but high computational complexity, and can fully utilize the powerful computing resources of the cloud.

[0025] Path ② adopts a "cloud training-cloud inference-edge optimization" mode, and the optimization algorithm is downgraded to the edge side for execution. The cloud is responsible for model training and prediction inference, and generates prediction values which are then sent to the edge controller, which executes the optimization algorithm in combination with local real-time data. While ensuring prediction accuracy, the system's response capability to local real-time conditions is improved.

[0026] Path ③ adopts a "cloud training-edge inference-edge optimization" mode, and the cloud is only responsible for model training, and the trained model is sent to the edge controller, which performs inference and optimization tasks simultaneously. This maximizes the use of edge computing resources and is suitable for application scenarios with the highest real-time response requirements and limited network communication conditions.

[0027] These three implementation paths constitute a complete cloud-edge collaborative solution system, which can meet the testing and running requirements in different application scenarios through modularized function combination and flexible deployment strategies. The paths can be dynamically switched or combined according to actual requirements, providing strong technical support for microgrid optimization scheduling and realizing the optimal allocation of computing resources and continuous improvement of system performance.

[0028] Further, in combination with Figure 2As shown, the application creatively adopts the design method of decoupling communication interface and business logic in view of the diversity of edge controller communication protocols. A set of software-configurable multi-protocol communication interface subsystem is designed between the real-time simulator and the edge controller. The subsystem includes two core components: protocol interface model library and protocol switching module. The protocol interface model library preloads software interface models supporting multiple industrial communication protocols, covering mainstream industrial protocols such as Modbus TCP / RTU, IEC 61850, and EtherCAT. The protocol switching module works with the protocol interface model library to receive protocol selection instructions from the host computer software and activate the corresponding software interface model based on the protocol selection instructions while disabling other software interface models. Specifically, the protocol switching module receives protocol selection instructions through a configurable software variable, and different values of the software variable correspond to a specific communication protocol. When the user selects the target communication protocol through the host computer software interface, the system automatically assigns the software variable to the identification value of the corresponding target communication protocol. After the protocol switching module detects the change in the software variable value, it automatically completes the switching of the underlying communication configuration, enabling seamless switching between different communication protocols, and the entire process does not require modification of hardware connections.

[0029] Taking the energy storage converter (PCS) as an example, based on its actual communication protocol specification, Modbus-TCP and EtherCAT communication interface models are constructed in the real-time simulator, and automatic switching between the two protocols is realized through a software variable protocol_select. For example: When protocol_select = 1, the system selects Modbus-TCP communication protocol; When protocol_select = 2, the system selects EtherCAT communication protocol; In actual operation, when the user selects the target communication protocol through the host computer interface of the real-time simulator, the system will automatically assign the software variable protocol_select. For example, when the user selects the Modbus-TCP communication protocol, the software variable protocol_select is assigned a value of 1, and the protocol switching module activates and initializes the Modbus-TCP protocol interface module while disabling the EtherCAT protocol interface module.

[0030] When the user needs to switch to the EtherCAT communication protocol, only needs to select EtherCAT on the host computer interface, the system will automatically assign the software variable protocol_select to the value 2. The protocol switching module monitors the change of the software variable protocol_select in real time, and once the variable value changes from value 1 to value 2, the protocol switching module will immediately disable the Modbus-TCP protocol interface module currently running, activate and initialize the EtherCAT protocol interface module, and re-establish the data connection.

[0031] Therefore, the user only needs to select the target communication protocol through the host computer interface to trigger the protocol switching mechanism and complete the seamless switching of the communication protocol. The whole process is completed through software configuration, without changing the underlying model structure or hardware wiring configuration, truly realizing the test ability of one platform and multiple protocols, and significantly improving the test efficiency and system flexibility.

[0032] Further, the test platform of the present application also integrates a test management and evaluation subsystem, which provides a human-computer interaction interface, supports user-defined and injected test cases (such as power grid failure, load mutation, weather change, etc.), and automatically records, analyzes, and generates test reports, realizing the automation, standardization, and repeatability of the test process.

[0033] The core architecture of the subsystem includes the following components: Test case library, preloaded with parameterized standard test scenario scripts, covering typical operating conditions and boundary conditions; Test case injection interface: supports dynamically and seamlessly injecting the user-selected standard test scenario scripts or user-defined test scenario scripts during the running of the real-time digital twin model; Data recording and analysis module: automatically triggers data recording after test case injection, and automatically generates evaluation reports based on predefined performance indicators, realizing the automation, standardization, and repeatability of the test process.

[0034] Among them, the performance indicators include control performance indicators, economic indicators, communication delay indicators, and AI algorithm convergence indicators.

[0035] Therefore, the present application realizes the whole-process closed loop from test case management, dynamic injection to automatic evaluation through the design of the test management and evaluation subsystem, significantly improves the test efficiency and the comparability of the results, and provides a comprehensive and reliable verification environment for microgrid control algorithms and devices.

[0036] In summary, the test platform provides a safe, efficient and comprehensive R&D and verification environment for micro-grid optimization scheduling solutions through its flexible system construction capability, closed-loop test verification capability, intelligent cloud-edge collaboration capability and automated test evaluation capability, significantly reducing the trial-and-error cost and risk of AI algorithms in real system applications, improving test efficiency and system reliability, accelerating the maturity and landing of intelligent scheduling strategies, and realizing closed-loop verification of cloud-edge collaborative intelligent decision-making processes.

[0037] Embodiment 2 In combination Figure 3 As shown, the micro-grid optimization scheduling algorithm test method based on the test platform of the application includes the following five core steps: S1, running a real-time digital twin model of a micro-grid system in the real-time simulator; S2, based on the communication protocol actually used by the edge controller, configuring the corresponding communication protocol through the multi-protocol communication interface subsystem to complete the point table mapping between the real-time simulator and the edge controller, forming a hardware-in-the-loop test closed loop; S3, the cloud platform collects real-time state data from the digital twin model, performs time granularity unification and standardization processing on the real-time state data, and stores it to the database, the real-time state data including power generation data and load power consumption data; S4, the cloud platform calls the historical data in the database to execute power generation prediction model training tasks and load power consumption prediction model training tasks, and generates corresponding power generation prediction models and load power consumption prediction models; S5, based on the power generation prediction model and the load power consumption prediction model, through the collaborative working mechanism of the cloud platform and the edge controller, the closed-loop test of the micro-grid optimization scheduling algorithm is executed, and the prediction model is dynamically corrected according to the monitoring data fed back by the edge controller.

[0038] In the above step S1, the real-time twin digital model of the micro-grid is built in the real-time simulator, including the real-time digital twin models of key components such as power grid, energy storage system, photovoltaic power generation system, diesel generator system, wind power generation system and load, which are used to accurately simulate the dynamic operation characteristics of the micro-grid system containing multiple distributed power sources. After modeling, all component models are stored in the model library to support direct calling and rapid reuse of different scenarios. It should be particularly noted that the micro-grid power type supported by the platform has high flexibility and can be configured according to actual application requirements, including but not limited to single type or any combination form of photovoltaic power generation system, wind power generation system and diesel generator system. This design enables the platform to adapt to the simulation needs of micro-grid systems in different regions and different energy structures.

[0039] In the above step S2, the edge controller to be tested is connected to the real-time simulator through a physical interface (including a network cable, a serial cable, or an optical fiber, etc.). The edge controller in this embodiment includes a microgrid controller, a storage unit controller, a photovoltaic unit controller, a diesel generator unit controller, and a load unit controller. Based on the communication protocol actually used by the edge controller, the corresponding communication protocol is selected in the host computer interface of the real-time simulator, and the point table mapping between the real-time simulator and the edge controller is completed through a multi-protocol communication interface subsystem, forming a millisecond-level response hardware-in-the-loop test closed loop. At the same time, the communication connection between the edge controller, the real-time simulator and the cloud platform is established, and a cloud-edge-end collaborative test architecture is constituted.

[0040] In the above step S3, the cloud platform collects real-time state data from the digital twin model, including power generation data, load data, and related meteorological data. These raw data usually have a time granularity of 1-5 minutes, which are uniformly processed into standardized data with a granularity of 15 minutes, 30 minutes, or 60 minutes by taking the periodic average value, and a complete database storage system is established. It should be noted that the specific content of the real-time power generation data is directly related to the type of power source actually configured in the microgrid: when the microgrid is configured with a photovoltaic power generation system, real-time photovoltaic power generation data is collected; when both photovoltaic and diesel power generation systems are configured, real-time data of both are collected. In addition, when the type of power source actually configured in the microgrid includes a photovoltaic power generation system or a wind power generation system, etc., related meteorological data also needs to be collected. Through the conversion of data time granularity and the integration of data sets, accurate and consistent input data basis is provided for subsequent model training.

[0041] In the above step S4, the model training module of the cloud platform calls the historical data in the database, and according to the power source configuration of the actual microgrid system, respectively executes the corresponding power generation prediction model training task and the load power consumption prediction model training task. It should be noted that the type of power generation prediction model can be flexibly selected according to the power source configuration of the actual microgrid system, including a photovoltaic power generation prediction model, a wind power generation prediction model, a diesel power generation prediction model, etc. Among them, the training of the photovoltaic power generation prediction model and the wind power generation prediction model needs to combine temperature, irradiance, wind speed and other meteorological data; while the diesel power generation prediction model is mainly trained according to historical operation data and load characteristics, without relying on meteorological data. Through system learning of the physical laws and behavior patterns contained in the historical data, the prediction models of photovoltaic power generation and power consumption demand are constructed, and the trained model file is saved to the specified storage location.

[0042] In step S5, based on the trained power generation prediction model and load power consumption prediction model, through the cooperative working mechanism of the cloud platform and the edge controller, the microgrid optimization scheduling algorithm completes the test process, which specifically includes executing the inference task based on the prediction model, taking the output result of the inference task as the input of the optimization scheduling algorithm, and outputting the optimization scheduling instruction in combination with the real-time power control strategy of each grid-connected point.

[0043] It should be particularly pointed out that the present application provides three cloud-edge cooperative working paths: cloud training-cloud inference-cloud optimization, cloud training-cloud inference-edge optimization, and cloud training-edge inference-edge optimization, which can be flexibly selected according to actual application scenarios. Hereinafter, the cloud training-cloud inference-cloud optimization will be taken as an example to introduce the complete test process of the microgrid optimization scheduling algorithm executed by the cloud-edge cooperation in detail.

[0044] Specifically, in combination with Figure 4 As shown in the above step S5, based on the power generation prediction model and the load power consumption prediction model, through the cooperative working mechanism of the cloud platform and the edge controller, the closed-loop test of the microgrid optimization scheduling algorithm is executed, and the prediction model is dynamically modified according to the real-time state data fed back by the edge controller. S51, the inference module loads the power generation prediction model and the load power consumption prediction model, executes inference calculation in combination with the historical data in the database within a specific time window before the current time, and outputs the power generation power prediction value and the load power consumption power prediction value in the future preset time period; S52, the optimization module receives the power generation power prediction value and the load power consumption power prediction value, runs the preset optimization algorithm, generates system optimization scheduling instructions, the optimization scheduling instructions include the power limiting instructions of the power generation system and the charge-discharge instructions of the energy storage system, and the optimization scheduling instructions are sent to the edge controller; S53, the edge controller receives the optimization scheduling instructions, fuses the local control strategy running in it, generates device-level control instructions, the device-level control instructions include the target value of the charge-discharge power of the energy storage system, the power limiting value of the power generation system and the control value of the load power consumption power, and the device-level control instructions are sent to the real-time simulator; S54, the real-time simulator executes the received device-level control instructions, and collects the real-time state data of the digital twin model, and uploads the real-time state data to the edge controller and the cloud platform; S55, the cloud platform updates and corrects the power generation power prediction model and the load power consumption power prediction model based on the real-time state data uploaded by the real-time simulator.

[0045] In the above steps S51-S55, the inference module loads the trained prediction model, performs inference calculation combined with recent historical data, and outputs the power generation prediction value and the load power consumption prediction value in the future preset period, usually 24-72 hours of power generation prediction value and load power consumption prediction value. It should be noted that the inference task also needs to load the historical data in the database, and the difference from the model training task is that the inference task loads recent historical data, such as historical data one month before the current time. The prediction result integrates the past learning rule, provides a forward-looking input for system optimization, and provides a crucial decision basis for the subsequent optimization algorithm, so that the optimization algorithm can foresee the future and make a scheduling decision that is not only beneficial to the present but also optimal for the future. The optimization module receives the prediction result of the prediction module, runs the preset optimization scheduling algorithm, generates system optimization scheduling instructions, and issues them to the edge controller. The edge controller receives the optimization scheduling instructions issued by the cloud, and combines the local control strategies such as anti-backflow control and overload protection running internally to generate device-level control instructions and issue them to the real-time simulator for execution. The real-time simulator receives the real-time control instructions and collects real-time state data of devices and power grids in the microgrid system. These real-time state data are uploaded to the edge controller and the cloud platform through the communication link to form a complete closed-loop control. The real-time state data are not only used for real-time control adjustment, but also provide new training samples for model optimization, realizing continuous improvement of the system.

[0046] The embodiment constructs a complete cloud-edge-end collaborative test system through the above five core steps and specific implementation processes, provides a full-process solution from model component, environment configuration to algorithm verification for the optimization scheduling algorithm of the optical storage and diesel microgrid, and significantly improves the reliability and efficiency of the test.

[0047] Further, in combination with Figure 5 As shown in the figure, the application realizes an automatic closed-loop test process through a test management and evaluation subsystem, specifically including the following steps: S61, injecting a test case into the real-time digital twin model through the test management and evaluation subsystem; S62, the real-time digital twin model generates real-time state data in response to the test case and outputs the real-time state data to the edge controller and the cloud platform; S63, the edge controller runs a control algorithm based on the received real-time state data to generate a control instruction, and issues the control instruction to the real-time digital twin model for closed-loop test running; S64, the cloud platform performs model training based on the received real-time state data to update and correct the power generation prediction model and the load power consumption prediction model online; S65, the test management and evaluation subsystem automatically records the state data of the whole process, generates a performance evaluation report for the control algorithm based on predefined evaluation indicators, and feeds back the evaluation results to the cloud platform for guiding subsequent algorithm parameter tuning and model retraining.

[0048] In the above steps S61-S65, the test management and evaluation subsystem provides a complete test solution. The system pre-provisions a test case library for typical scenarios, which can be one-key selected and called by the user as needed. At the same time, it also supports user-defined test cases, including power grid faults, load mutations, weather change curves and other test scenarios. The entire test process is fully automated: starting from dynamic injection of test cases, real-time digital twin models generate state data and send them to edge controllers and cloud platforms; edge controllers execute control algorithms and feed back control instructions; the cloud platform continuously optimizes the prediction model based on real-time state data; the test management system automatically records and analyzes test data, and generates a comprehensive evaluation report containing control performance, economy, communication delay and algorithm convergence, etc.

[0049] Thus, the present application establishes a complete test, evaluation, and optimization iteration closed loop, realizes full-process automation from test injection, state feedback, algorithm optimization to performance evaluation, significantly improves test efficiency and algorithm reliability, and provides a complete solution for microgrid control strategy verification.

[0050] Embodiment 3 This embodiment takes the optimization scheduling of a photovoltaic-storage-diesel microgrid as an example to specifically describe the microgrid optimization scheduling method of the present application.

[0051] System construction and connection configuration First, the digital twin modeling of the controlled object is completed, and a photovoltaic-storage-diesel microgrid system model is constructed in a real-time simulator. The system includes an infinite grid, an energy storage system (including a battery pack), a photovoltaic power generation system (including a photovoltaic module), a diesel generator system, and a controllable load (taking a mine-used variable frequency motor as an example). All components are modeled using standardized modeling methods, and after modeling, they are stored in the platform model library for subsequent direct calling and reuse in different application scenarios.

[0052] The test objects of this test scenario include cloud controller, edge microgrid controller, energy storage unit controller, photovoltaic unit controller, diesel generator unit controller and load unit controller. To meet the diversity requirements of edge-end communication protocols, this scheme supports two mainstream industrial protocols, Modbus TCP / RTU and EtherCAT. Based on the communication protocol specifications of specific devices, complete communication protocol interface modules are established in the real-time simulator, and the modeling of the protocol switching module is completed. By setting dedicated control variables, users only need to configure the corresponding variable values in the host computer interface of the real-time simulator to achieve flexible switching of the communication protocol.

[0053] In the test environment setup stage, the edge controller under test is connected to the real-time simulator through physical interfaces (network cable, serial cable) to build a complete hardware-in-the-loop test infrastructure.

[0054] B, closed-loop test running mechanism The cloud platform performs photovoltaic power generation prediction model training tasks and load power consumption prediction model training tasks based on collected historical photovoltaic power generation data, load power consumption data and meteorological data, and uses the prediction model for intelligent prediction to generate photovoltaic power generation power prediction values and load power consumption power prediction values for specific time periods in the future. Based on this prediction result, the optimization algorithm deployed by the cloud platform is executed to generate system optimization scheduling instructions, including power limiting instructions for the power generation system, charge and discharge instructions for the energy storage system, and start and stop instructions for the diesel generator system, etc., and these optimization scheduling instructions are issued to the edge controller.

[0055] After receiving the cloud platform optimization scheduling instructions, the edge controller generates specific device-level control instructions in combination with the internally running local control strategy (such as the anti-backflow operation strategy), including energy storage charge and discharge power values, photovoltaic power limiting instructions, including energy storage system charge and discharge power target values, power generation system power limiting values, and load power consumption control values, etc., and sends these device-level control instructions to the real-time simulator.

[0056] The real-time simulator runs the microgrid digital twin model, executes the control instructions issued by the edge controller, and feeds back system operation state data (including voltage, current and power of the public connection point, real-time power of the energy storage converter, real-time power of the diesel generator, etc.) to the edge controller, and then uploads it to the cloud controller, forming a complete closed-loop test loop.

[0057] C, cloud-edge collaborative implementation scheme In order to realize the rapid verification of different algorithm paths, a distributed collaborative architecture is adopted between the cloud platform and the edge controller, and model training, model inference and algorithm optimization are decoupled and designed. Each functional module can be independently run, and can realize task collaboration through a standardized interface, support flexible combination of different module outputs, and thus realize diversified cloud-edge collaborative schemes.

[0058] Taking cloud training, cloud inference and edge optimization as examples, the specific implementation process is as follows: The cloud platform collects real-time photovoltaic power generation data (1-5 minute time granularity) from the edge controller, processes it into 15 / 30 / 60 minute time granularity standardized data by taking the periodic average value method, and stores it to the database. At the same time, the corresponding time meteorological data (temperature, irradiance, wind speed, etc.) are processed into the same time granularity data set, and a complete data reserve is established.

[0059] The cloud platform establishes photovoltaic power generation prediction model training tasks and load power consumption prediction model training tasks respectively, calls the corresponding data set for model training, and saves the trained model file to the specified location. Then the inference task is executed, the trained model and the historical data of the past month are loaded, and the photovoltaic power prediction value and the load power consumption prediction value of the future 24-72 hours with a time granularity of 15 / 30 / 60 minutes are generated.

[0060] The prediction result file generated by the inference task is issued to the edge side controller. The edge controller selects the cloud prediction result as the input data source of the optimization algorithm, executes the local optimization algorithm, and at the same time combines the grid-connected point real-time power control strategy (including overload protection, anti-backflow control, etc.), generates real-time control instructions and issues them to the equipment in the simulation machine model for execution.

[0061] D, test execution and evaluation The user injects a specific test working condition through the test management and evaluation subsystem interface, and the platform automatically executes the whole process test and records the test data. After the test is completed, the system generates a comprehensive evaluation report for the algorithm performance, device performance and protocol compatibility based on the pre-defined evaluation index system, providing data support for the verification and improvement of the optimization scheduling strategy.

[0062] The above complete implementation process shows the specific application of the present application in the optimization scheduling test of the micro-grid of photovoltaic storage and diesel, and embodies the technical advantages and innovative value of the platform in system construction, closed-loop test, cloud-edge collaboration, etc.

[0063] In summary, the test platform of the present application provides a complete mapping from virtual to reality for the solution, and is the trust basis for all algorithm verification. It has the following beneficial effects: Model reuse: the models mentioned in the case, such as photovoltaic, energy storage, diesel generator, etc. Exist in the model library, which can quickly build the scene. This greatly reduces the modeling cost and ensures the consistency and accuracy of the model.

[0064] Seamless integration of protocols: In the face of complex Modbus TCP / RTU and EtherCAT protocols on the edge-end side, the platform uses pre-established communication protocol interface modules and protocol switching modules to switch by configuring variables on the host computer. This solves the core pain point of heterogeneous industrial field devices and achieves high consistency between the test environment and the real environment.

[0065] Real hardware-in-the-loop: Connect the various real controllers on the cloud and edge side to be tested into the closed loop, so that the test includes factors such as computing delay and communication jitter of real hardware that pure software simulation cannot simulate, greatly improving the credibility of the verification results.

[0066] It should be emphasized that: the above is only the preferred embodiment of the present application, not any form of limitation on the present application, any simple modification, equivalent change and modification of the above embodiment according to the technical essence of the present application still belongs to the scope of the technical solution of the present application.

Claims

1. A real-time simulation test platform for cloud-edge-device collaborative microgrids, characterized in that, include: A cloud platform, a real-time simulator, and at least one edge controller; The real-time simulator is configured to run a real-time digital twin model of the microgrid system to simulate the real-time dynamic characteristics of the microgrid system. The real-time simulator is connected to the edge controller through a multi-protocol communication interface subsystem, which is used to realize data interaction and control command transmission between the real-time digital twin model and the edge controller, forming a hardware-in-the-loop test closed loop. The multi-protocol communication interface subsystem includes a protocol interface model library and a protocol switching module; The protocol interface model library has pre-built software interface models that support multiple industrial communication protocols. The protocol switching module is connected to the protocol interface model library and is used to receive external protocol selection instructions and activate the corresponding software interface model and disable other software interface models based on the protocol selection instructions. The cloud platform is communicatively connected to the edge controller and the real-time simulator, respectively, for deploying and training the prediction model, and for receiving real-time status data from the digital twin model.

2. The cloud-edge-device collaborative microgrid real-time simulation test platform according to claim 1, characterized in that, The various industrial communication protocols include, but are not limited to, at least two of Modbus TCP / RTU, IEC 61850, and EtherCAT.

3. The cloud-edge-device collaborative microgrid real-time simulation test platform according to claim 1, characterized in that, The protocol switching module receives the protocol selection instruction through a configurable software variable, and different values ​​of the software variable correspond to a specific communication protocol. In response to the protocol selection instruction, the protocol switching module automatically completes the switching of the underlying communication configuration by changing the current value of the software variable, thereby realizing the switching between different communication protocols.

4. The cloud-edge-device collaborative microgrid real-time simulation test platform according to claim 1, characterized in that, It also includes a test management and evaluation subsystem, which includes: The test case library contains pre-built parameterized standard test scenario scripts; The test case injection interface is configured to dynamically inject the user-selected standard test scenario script or the user-defined test scenario script during the operation of the real-time digital twin model. The data recording and analysis module is used to automatically trigger data recording after test case injection and automatically generate the evaluation report based on predefined performance indicators, including control performance indicators, economic indicators, communication latency indicators, and AI algorithm convergence indicators.

5. The cloud-edge-device collaborative microgrid real-time simulation test platform according to claim 1, characterized in that, The cloud platform and the edge controller adopt a distributed collaborative architecture, including: The model training module, deployed on the cloud platform, is used to train the prediction model using historical data and real-time state data from the digital twin model. The model inference module, deployed on the cloud platform and / or the edge controller, is connected to the model training module and is used to load the trained prediction model and execute inference tasks to output prediction results. An optimization algorithm module, deployed on the cloud platform and / or edge controller, is connected to the model inference module and can generate optimized scheduling instructions based on the prediction results of the model inference module. The model training module, model inference module, and optimization algorithm module can run independently or be freely combined to form different cloud-edge collaborative workflows.

6. A test method for microgrid optimization scheduling based on the test platform described in any one of claims 1-5, characterized in that, Includes the following steps: A real-time digital twin model of the microgrid system is run in the real-time simulator. Based on the actual communication protocol used by the edge controller, the corresponding communication protocol is configured through the multi-protocol communication interface subsystem to complete the point table mapping between the real-time simulator and the edge controller, forming a hardware-in-the-loop test closed loop. The cloud platform collects real-time status data from the digital twin model, performs time granularity unification and standardization processing on the real-time status data, and stores it in the database. The real-time status data includes real-time power generation data and load power consumption data. The cloud platform calls historical data from the database to perform a prediction model training task and generate a corresponding prediction model, which includes a power generation prediction model and a load power consumption prediction model. Based on the power generation prediction model and the load consumption prediction model, the closed-loop test of the microgrid optimization scheduling algorithm is performed through the collaborative working mechanism of the cloud platform and the edge controller, and the prediction model is dynamically corrected according to the real-time status data fed back by the digital twin model.

7. The method according to claim 6, characterized in that, Based on the power generation prediction model and the load consumption prediction model, the steps of performing closed-loop testing of the microgrid optimization scheduling algorithm through the collaborative working mechanism of the cloud platform and the edge controller, and dynamically correcting the prediction model according to the real-time status data fed back by the digital twin model include: The inference module loads the power generation prediction model and the load power consumption prediction model, combines the historical data within a specific time window before the current time in the database, performs inference calculations, and outputs the predicted power generation and load power consumption values ​​for the future preset time period. The optimization module receives the predicted power generation value and the predicted power consumption value, runs a preset optimization algorithm, generates a system optimization scheduling instruction, the optimization scheduling instruction includes a power limiting instruction for the power generation system and a charging and discharging instruction for the energy storage system, and sends the optimization scheduling instruction to the edge controller. The edge controller receives the optimized scheduling instruction, integrates its internal local control strategy, generates device-level control instructions, which include the target value of the charging and discharging power of the energy storage system, the power limit value of the power generation system, and the control value of the load power consumption, and sends the device-level control instructions to the real-time simulator. The real-time simulator executes the received device-level control commands, collects real-time status data of the digital twin model, and uploads the real-time status data to the edge controller and cloud platform. The cloud platform updates and corrects the power generation prediction model and the load power consumption prediction model online based on the real-time status data uploaded by the real-time simulator.

8. The method according to claim 6, characterized in that, It also includes testing, evaluation, and optimization steps: Test cases are injected into the real-time digital twin model through the test management and evaluation subsystem; The real-time digital twin model generates real-time status data in response to the test cases and outputs the real-time status data to the edge controller and cloud platform; Based on the received real-time status data, the edge controller runs a control algorithm to generate control commands and sends the control commands to the real-time digital twin model to perform closed-loop test operation. The cloud platform trains models based on the received real-time status data and updates and corrects the power generation prediction model and load power consumption prediction model online. The test management and evaluation subsystem automatically records the status data throughout the process and generates a performance evaluation report for the control algorithm based on predefined evaluation indicators.

9. The method according to claim 7 or 8, characterized in that, Following the step of online updating and correcting the power generation prediction model and the load power consumption prediction model, the method further includes a step of distributing the online updated and corrected prediction model to the edge controller. This step specifically includes: The cloud platform establishes communication with the edge controller and automatically obtains the model format information supported by the edge controller; The cloud platform converts the trained prediction model into a target format file compatible with the edge controller based on the model format information, and then sends the converted model file to the edge controller.

10. The method according to claim 8, characterized in that, After the step of the test management and evaluation subsystem automatically recording the status data throughout the process and generating a performance evaluation report for the control algorithm based on predefined evaluation metrics, the system further includes the following step: The test management and evaluation subsystem feeds back the evaluation results from the performance evaluation report to the cloud platform; Based on the evaluation results, the cloud platform performs parameter tuning and model retraining on the power generation prediction model, load consumption prediction model, and optimization algorithm.

Citation Information

Patent Citations

  • Complex product collaborative simulation environment construction method

    CN110991040A

  • Industrial edge controller for expressway and verification method

    CN118707877A

  • Distributed resource intelligent optimization regulation and control system and terminal

    CN118920471A

  • Distribution and micro collaborative simulation test platform and control method

    CN119596728A

  • Tunnel modular prefabricated cabin power supply and distribution intelligent substation self-adaptive regulation and control system based on edge calculation

    CN120657962A