Cross-platform non-delay heterogeneous multiplexing method of electromagnetic transient model control algorithm
By building a Simulink model in the MATLAB environment and converting it into a Mexw64 file, and then packaging it into an FMU-ME file using the FMI standard, the complexity and consistency issues of data interaction in cross-platform simulation models of new energy power generation systems were resolved. This enabled zero-delay heterogeneous reuse and improved the consistency and reliability of simulation results.
Patent Information
- Application Number
- CN202511673602.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-01-23
AI Technical Summary
In existing technologies, simulation models of new energy power generation systems suffer from low efficiency, high data interaction complexity, and lack of adaptability and consistency verification when called across platforms. In particular, they are difficult to meet the simulation requirements of dynamic characteristics and control strategies of new energy systems under complex operating conditions.
By building a Simulink model in the MATLAB environment and converting it into a Mexw64 file, packaging it into an FMU-ME file using the FMI standard, and combining it with FMI interface functions to achieve cross-platform data interaction and error analysis, middleware was developed to support zero-latency data transmission and consistency verification across different simulation platforms.
It enables cross-platform, zero-latency data interaction, improves the consistency and reliability of simulation results, simplifies the complexity of data interaction, enhances the real-time performance and accuracy of simulation feedback, and provides flexibility to adapt to different simulation scenarios.
Smart Images

Figure CN121387271A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of new energy power system simulation technology, and particularly relates to a cross-platform non-delay heterogeneous multiplexing method of an electromagnetic transient model control algorithm. BACKGROUND
[0002] With the increasing proportion of new energy power generation capacity, the simulation verification of its dynamic characteristics and control strategies has become an important prerequisite for ensuring the long-term safe, stable and economic operation of the power system. However, due to the complexity of new energy system control algorithms and the diversification of simulation platforms, higher requirements are put forward for the effectiveness and cross-platform adaptability of the simulation model.
[0003] Currently, simulation model development mainly relies on offline electromagnetic transient simulation software or semi-physical simulation software (such as RTLAB). However, the control models of these two types of platforms do not have cross-platform adaptability, especially when the model is encapsulated and has no source code. Directly calling such models in the power system computer-aided design tool PSCAD not only is inefficient, but also is difficult to meet the actual needs of dynamic characteristic consistency verification of different software under complex working conditions.
[0004] FMI (Functional Mock-up Interface) as a standardized model interface technology provides a solution to achieve cross-platform compatibility and efficient data interaction by encapsulating different simulation platform models. However, in the field of consistency verification of new energy power generation system simulation models, the above technology still has the following main problems:
[0005] First, the FMI applicability is insufficient: there is still a lack of systematic solutions to ensure that the simulation efficiency and multiplexing performance are not affected during model conversion, especially when balancing the computing performance and data interaction efficiency between different platforms.
[0006] Second, the data interaction complexity is high: due to the differences in data types, time steps and calculation accuracy between simulation platforms, the cross-platform data interaction rules are complex, and additional mechanisms are needed to ensure the correctness and time synchronization of data transmission, to avoid inconsistency or potential simulation delay.
[0007] Third, there is a lack of adaptability for specific scenarios: existing solutions usually do not fully consider the dynamic characteristics and control algorithm requirements of new energy power generation systems (such as wind power, photovoltaic, energy storage, etc.), especially under complex working conditions. Traditional simulation verification methods are difficult to ensure consistency and accuracy between different simulation platforms, affecting the real-time performance and reliability evaluation of new energy systems. SUMMARY
[0008] In view of the problems in the prior art, the application provides a cross-platform non-delay heterogeneous multiplexing method of an electromagnetic transient model control algorithm, realizes cross-platform non-delay heterogeneous multiplexing of the electromagnetic transient model control algorithm based on FMU-ME (Functional Mock-up Unit-Model Exchange), solves the complexity problem of cross-platform data interaction, and performs error analysis and consistency verification in view of the dynamic characteristics of a new energy power generation system, and is especially suitable for software heterogeneity, transplantation and dynamic characteristic verification of a simulation model of the new energy power generation system (including a wind power system, a photovoltaic system and an energy storage system).
[0009] The application provides a cross-platform non-delay heterogeneous multiplexing method of an electromagnetic transient model control algorithm, comprising the following steps:
[0010] In a MATLAB environment, an electromagnetic transient simulation control algorithm model is constructed through an S-Function module, and the electromagnetic transient simulation control algorithm model is a Simulink model;
[0011] An S-Function code block of the electromagnetic transient simulation control algorithm model is converted into a Mexw64 file in a model conversion mode, and then the Mexw64 file is packaged into an FMU-ME file by using a C language code program based on an FMI standard;
[0012] An electrical topology structure corresponding to the Simulink model is built in a target simulation platform;
[0013] An FMI interface matching function of the FMU-ME file is called to convert output data of the target simulation platform according to the electrical topology structure into a data format supported by the FMU-ME file, and then the data is transmitted to an FMU main program for simulation calculation, and simulation calculation results are converted into a data format supported by the target simulation platform, and then the data is transmitted to a control module in the target simulation platform to perform simulation control on the electrical topology structure.
[0014] According to the cross-platform non-delay heterogeneous multiplexing method of the electromagnetic transient model control algorithm, the S-Function code block of the electromagnetic transient simulation control algorithm model is converted into a Mexw64 file in a model conversion mode, and the method comprises the following steps:
[0015] Under the FMI standard, the S-Function code block is loaded by using a two-in MEX file;
[0016] In a configuration parameter of the S-Function code block, a target language is selected as C code, and a simulation step length is set as a variable step length mode;
[0017] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0018] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0019] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0020] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0021] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0022] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0023] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0024] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0025] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0026] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0027] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0028] A construction module is configured to construct an electromagnetic transient simulation control algorithm model in a MATLAB environment through an S-Function module, and the electromagnetic transient simulation control algorithm model is a Simulink model.
[0029] A conversion module is configured to convert an S-Function code block of the electromagnetic transient simulation control algorithm model into a Mexw64 file in a model conversion mode, and then package the Mexw64 file into an FMU-ME file using a C language code program based on an FMI standard.
[0030] A construction module is configured to construct an electromagnetic transient simulation control algorithm model in a MATLAB environment through an S-Function module, and the electromagnetic transient simulation control algorithm model is a Simulink model.
[0031] An interaction module is configured to call an FMI interface matching function of the FMU-ME file to convert output data of the target simulation platform according to the electrical topology structure into a data format supported by the FMU-ME file, and then transmit the data to an FMU main program for simulation calculation, and convert simulation calculation results into a data format supported by the target simulation platform, and then transmit the data to a control module in the target simulation platform to perform simulation control on the electrical topology structure.
[0032] The application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the cross-platform non-delay heterogeneous multiplexing method of the electromagnetic transient model control algorithm when executing the program.
[0033] The application further provides a non-transitory computer readable storage medium having a computer program stored thereon, and the computer program implements the cross-platform non-delay heterogeneous multiplexing method of the electromagnetic transient model control algorithm when executed by a processor.
[0034] The application further provides a computer program product including a computer program, and the computer program implements the cross-platform non-delay heterogeneous multiplexing method of the electromagnetic transient model control algorithm when executed by a processor.
[0035] The cross-platform non-delay heterogeneous multiplexing method of the electromagnetic transient model control algorithm has the following advantages:
[0036] The cross-platform non-delay heterogeneous multiplexing method of the electromagnetic transient model control algorithm has the following advantages: The cross-platform non-delay heterogeneous multiplexing method of the electromagnetic transient model control algorithm realizes cross-platform non-delay heterogeneous multiplexing, and through heterogeneous multiplexing conversion of an electromagnetic transient simulation control algorithm model, no-delay data interaction and model multiplexing between different simulation platforms (such as Simulink and PSCAD) can be realized, multiple software multiplexing can be realized, the workload of modeling is reduced, simulation results of multiple software remain consistent, and the cross-platform data interaction delay problem in the traditional simulation method is solved.
[0037] Simplify data interaction complexity: The invention realizes the data non-delay interaction between different simulation platforms by developing middleware supporting FMI standard. The middleware can effectively handle data format conversion and time synchronization, reduce the data transmission obstacles between different platforms, and ensure the consistency and efficiency of cross-platform simulation.
[0038] Improve the real-time and accuracy of simulation feedback: Based on the real-time calculation and closed-loop simulation feedback mechanism of the middleware, the simulation process can respond to the input signal in real time and update the calculation results, ensuring the efficiency and real-time feedback of the simulation system. By calling the FMI interface function to trigger the simulation model calculation, the timeliness and effectiveness of the simulation results are ensured.
[0039] Enhance the consistency and reliability of simulation results: Through the cross-platform simulation error analysis and consistency verification system, the consistency and difference of results between different simulation platforms can be comprehensively evaluated. Using evaluation indicators such as root mean square error and average absolute error, combined with theoretical values or experimental data for comparison, the accuracy of simulation results can be effectively verified, enhancing the reliability of the model between different simulation platforms.
[0040] Flexible adaptability: The middleware of the invention supports the adaptation and parameterization configuration of different simulation platforms, and can be flexibly adjusted according to different simulation scenarios. This makes the invention widely applicable to various types of electromagnetic transient simulation and dynamic simulation verification of new energy power generation systems, with strong universality and expandability. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the present application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings described below are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0042] Figure 1 is one of the flowchart of the cross-platform non-delay heterogeneous multiplexing method of the electromagnetic transient model control algorithm provided by the present application;
[0043] Figure 2 is the second flowchart of the cross-platform non-delay heterogeneous multiplexing method of the electromagnetic transient model control algorithm provided by the present application;
[0044] Figure 3 is the frame diagram of the cross-platform non-delay heterogeneous multiplexing method of the electromagnetic transient model control algorithm provided by the present application;
[0045] Figure 4It is the principle schematic diagram of middleware in a cross-platform no-delay heterogeneous multiplexing method of an electromagnetic transient model control algorithm provided by the application;
[0046] Figure 5 It is the principle schematic diagram of a conversion technology based on FMI standard in a cross-platform no-delay heterogeneous multiplexing method of an electromagnetic transient model control algorithm provided by the application;
[0047] Figure 6 It is the structure schematic diagram of a cross-platform no-delay heterogeneous multiplexing system of an electromagnetic transient model control algorithm provided by the application. DETAILED DESCRIPTION
[0048] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0049] The present application provides a cross-platform no-delay heterogeneous multiplexing method of an electromagnetic transient model control algorithm. Figure 1 The present application provides a cross-platform no-delay heterogeneous multiplexing method of an electromagnetic transient model control algorithm.
[0050] Step 101, in a MATLAB environment, an electromagnetic transient simulation control algorithm model is constructed through an S-Function module, and the electromagnetic transient simulation control algorithm model is a Simulink model;
[0051] Step 102, an S-Function code block of the electromagnetic transient simulation control algorithm model is converted into a Mexw64 file in a model conversion mode, and then a C language code program based on FMI standard is used to pack the Mexw64 file into an FMU-ME file;
[0052] Step 103, an electrical topology structure corresponding to the Simulink model is built in a target simulation platform;
[0053] Step 104, an FMI interface matching function of the FMU-ME file is called to convert output data of the target simulation platform according to the electrical topology structure into a data format supported by the FMU-ME file, and then the converted data is transmitted to an FMU main program for simulation calculation, and simulation calculation results are converted into a data format supported by the target simulation platform, and then the converted data is transmitted to a control module in the target simulation platform to perform simulation control on the electrical topology structure.
[0054] This invention provides a cross-platform, time-delay-free heterogeneous reuse method and consistency verification system for electromagnetic transient model control algorithms. For example... Figure 2 As shown, the present invention is implemented in the following order:
[0055] S1. Heterogeneous reuse conversion of electromagnetic transient simulation control algorithm model;
[0056] S2. Develop middleware for zero-latency data interaction and cross-platform adaptation;
[0057] S3. Middleware-based cross-platform zero-delay computation and closed-loop simulation result feedback;
[0058] S4. Cross-platform simulation error analysis and consistency verification system.
[0059] First, this invention provides a heterogeneous multiplexing conversion method for electromagnetic transient simulation control algorithm models based on the MATLAB environment. This method is implemented using conversion technology based on the FMI standard. Figure 3 As shown, this method, within the MATLAB environment, constructs the electromagnetic transient simulation control algorithm model using S-Function modules. This model is a Simulink model without any circuit components, implemented using standard Simulink modules, S-Functions (C language, MEXW32, or MEXW64), or a combination of both. Heterogeneous model reuse is achieved through an FMI-based conversion technique. This technique automatically identifies the S-Function model constructed in the MATLAB environment and converts its S-Function code blocks into Mexw64 files in Model Exchange (ME) mode. Subsequently, an FMI-based C language code program packages the Mexw64 files into an FMU-ME file (hereinafter referred to as middleware), generating middleware files suitable for cross-platform reuse. This conversion technique, under the premise of using the FMI (Functional Mock-up Interface) standard, loads S-Functions (such as .mexw32 / .mexw64) using binary MEX files, with the target language selected as C code and the simulation step size set to variable step size mode in the configuration parameters. In Model Exchange (ME) mode, the file is automatically packaged into a Mexw64 file. Then, a C language packaging program based on the FMI standard is used to package the Mexw64 file into an FMU-ME file to support subsequent heterogeneous reuse steps.
[0060] Secondly, in order to realize cross-platform data interaction and adaptation, the step S2 is as follows, and the application develops a data interaction middleware without delay. The packaging program of the middleware can be developed by using any development language (such as C language, Python and the like), so as to adapt to the needs of different simulation platforms. The middleware is developed based on the FMI standardized data interface, supports bidirectional data transmission, and can convert the control command from the PSCAD control algorithm model into a data format supported by the middleware.
[0061] In order to ensure the non-delay characteristic, as shown in the figure, Figure 4 The middleware adopts an efficient time synchronization algorithm to solve the time deviation problem in cross-platform data interaction. Meanwhile, the middleware also supports parameterized configuration of the model, and can flexibly adapt to various simulation scenarios.
[0062] Another innovation of the application is cross-platform non-delay calculation and closed-loop simulation result feedback based on the middleware. The step S3 is as follows, as shown in the figure, Figure 3 The input and output data in the middleware are converted to be consistent with the data format of the target platform, and the FMI interface matching function of the middleware is called for real-time calculation, so as to trigger the FMU main program to perform calculation operation at the current time step, and complete simulation calculation. In the closed-loop simulation feedback process, the calculation result is immediately transmitted to the control module of the target simulation platform, so as to realize real-time closed-loop control. The system can also judge whether the simulation process is ended according to the preset simulation termination condition (such as simulation time length or system stability criterion), if the termination condition is met, the data interaction is stopped, and the complete simulation result is output.
[0063] In the embodiment, based on the FMI standardized model interface technology, the complex dynamic algorithm defined by the S-Function module is encapsulated, the data interaction function of the PSCAD software is combined, the middleware is developed to realize efficient migration of the control algorithm model between different simulation platforms, the simulation data is interacted without delay, and the compatibility problem of the heterogeneous control algorithm of the simulation software is solved.
[0064] On the basis of the above embodiment, in the embodiment, the S-Function code block of the electromagnetic transient simulation control algorithm model is converted into a Mexw64 file in a model conversion mode, including:
[0065] Under the FMI standard, the S-Function code block is loaded by using a binary MEX file;
[0066] In the configuration parameters of the S-Function code block, the target language is selected as C code, and the simulation step length is set as a variable step length mode;
[0067] According to the target language and the simulation step, the S-Function code block is converted into a Mexw64 file.
[0068] The conversion technology based on the FMI standard is that, under the premise of using the FMI standard, the S-Function file (such as.mexw32 / .mexw64) is loaded by using the binary MEX file, the target language is selected as C code in the configuration parameter, and the simulation step is set as the variable step mode.
[0069] As shown in Figure 5 The conversion technology based on the FMI standard can automatically identify the S-Function module in MATLAB, convert the S-Function code block of the electromagnetic transient simulation control algorithm model into a Mexw64 file based on the FMI standard, then pack the Mexw64 file into an FMU-ME file by using the FMI standard C language code program, and automatically set the simulation step as the variable step mode, and automatically check the FMI (Functional Mock-up Interface) option to support the export of the functional module. In addition, the system also automatically selects the S-Function (such as.mexw32 / .mexw64) supporting the binary MEX file loading, and automatically packs the model in the Model Exchange (ME) mode to generate the Mexw64 file, so as to realize the heterogeneous reuse in the subsequent steps.
[0070] On the basis of the above-mentioned embodiments, the FMU-ME file in the present embodiment is developed based on the FMI standardized data interface.
[0071] On the basis of the above-mentioned embodiments, the electromagnetic transient simulation control algorithm model in the present embodiment can be reused on multiple target simulation platforms.
[0072] The model in the present embodiment can be reused on multiple platforms, and is not limited to the PSCAD platform. Cross-platform is not the cooperative simulation between two platforms, but a model can be used on multiple platforms, and does not need to be remodeled.
[0073] By using the C language code to pack the Mexw64 file into an FMU-ME file, the file can be compatible with the input and output of the conversion platform data, and the platform is not limited to PSCAD.
[0074] On the basis of the above-mentioned embodiments, the output data of the target simulation platform in the present embodiment includes the control instruction for the electrical topology structure output by the control module in the target simulation platform.
[0075] On the basis of the above-mentioned embodiments, in the present embodiment, the FMI interface matching function of the FMU-ME file is called to convert the output data of the target simulation platform according to the electrical topology into a data format supported by the FMU-ME file and then transmit to the FMU main program for simulation calculation, comprising:
[0076] Converting the output data of the target simulation platform according to the electrical topology into a data format supported by the FMU-ME file;
[0077] Calling the FMI interface matching function of the FMU-ME file, triggering the FMU main program to perform simulation calculation according to the output data of the target simulation platform in the current time step.
[0078] As shown in Figure 4 The format consistency of the input data is that the input signal of the current time step is read from PSCAD, and the input data is written into the corresponding input variable of the FMU through the fmi2_import_set_real function in the built-in FMI interface of the standard FMU-ME file and the Value Reference identifier. For the output data, the system extracts the calculation result from the output variable of the FMU through the fmi2_import_get_real function, and converts the extracted output data into a format that can be recognized by PSCAD by using the built-in interface of the standard FMU-ME file, and then transmits it to the target module of PSCAD. At the same time, in order to realize real-time calculation, the system calls the FMI interface function fmi2_import_do_step of the middleware to trigger the calculation operation of the middleware in the current time step, and completes the simulation calculation.
[0079] On the basis of the above-mentioned embodiments, in the present embodiment, further comprising:
[0080] Error evaluation is performed between the electrical topology of the Simulink model and the electrical topology simulated by the FMU-ME file, and an error evaluation result is generated;
[0081] The error evaluation result is compared with the theoretical value or experimental data to obtain a consistency test result of the simulation results between different simulation platforms.
[0082] In order to ensure the consistency of the results between different simulation platforms, the present application provides a cross-platform simulation error analysis and consistency test system. As shown in Figure 3As shown, the core functions of this system include acquiring simulation data from different simulation platforms (such as Simulink and PSCAD) and transmitting it to the error analysis unit via a standardized interface. The error analysis unit performs error assessment on the acquired simulation data, using metrics such as root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (XMAPE) to generate error assessment results. The consistency verification unit then compares these error assessment results with theoretical values or experimental data to evaluate the consistency of results across different simulation platforms. Finally, the system generates a report containing detailed error analysis data and consistency feedback to verify the consistency and accuracy of results across multiple simulation platforms.
[0083] This invention enables batch conversion from RTLAB models to PSCAD electromagnetic transient models, allowing for real-time conversion of nearly a hundred different types of new energy power plant models within a simulation environment. It also provides error analysis and consistency verification for the dynamic characteristics of new energy power generation systems. This invention will significantly improve simulation model conversion efficiency, reduce modeling workload, accelerate the research progress of new energy power plant projects, and expedite the technological development of the new energy industry.
[0084] The cross-platform, time-delay-free heterogeneous reuse method based on the electromagnetic transient model control algorithm provided by this invention has broad application prospects, especially in the dynamic characteristic analysis and control algorithm verification of new energy power generation systems (such as wind power, photovoltaic and energy storage systems). It can effectively improve simulation efficiency, adapt to various electromagnetic transient simulation platforms, meet the requirements of national standards, and provide important support for the planning, design and optimization of power systems.
[0085] The following describes the cross-platform, delay-free heterogeneous multiplexing system of the electromagnetic transient model control algorithm provided by the present invention. The cross-platform, delay-free heterogeneous multiplexing system of the electromagnetic transient model control algorithm described below and the cross-platform, delay-free heterogeneous multiplexing method of the electromagnetic transient model control algorithm described above can be referred to in correspondence with each other.
[0086] like Figure 6 As shown, the system includes a construction module 601, a conversion module 602, a building module 603, and an interaction module 604, wherein:
[0087] Module 601 is used to construct an electromagnetic transient simulation control algorithm model in the MATLAB environment through the S-Function module. The electromagnetic transient simulation control algorithm model is a Simulink model.
[0088] The conversion module 602 is configured to convert the S-Function code block of the electromagnetic transient simulation control algorithm model into a Mexw64 file in a model conversion mode, and then package the Mexw64 file into an FMU-ME file using a C language code program based on the FMI standard;
[0089] The building module 603 is configured to build an electrical topology structure corresponding to the Simulink model in a target simulation platform.
[0090] The interaction module 604 is configured to call an FMI interface matching function of the FMU-ME file to convert output data of the target simulation platform according to the electrical topology structure into a data format supported by the FMU-ME file, and then transmit the data to an FMU main program for simulation calculation, and convert simulation calculation results into a data format supported by the target simulation platform, and then transmit the data to a control module in the target simulation platform to perform simulation control on the electrical topology structure.
[0091] The embodiment realizes efficient migration of the control algorithm model between different simulation platforms by encapsulating a complex dynamic algorithm defined by the S-Function module based on the FMI standardized model interface technology, and combining a data interaction function of the PSCAD software, realizes efficient interaction of simulation data without delay, and solves the compatibility problem of heterogeneous control algorithms of simulation software.
[0092] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A cross-platform latency-free heterogeneous multiplexing method of an electromagnetic transient model control algorithm, characterized in that, The application relates to a method for constructing an electromagnetic transient simulation control algorithm model in a MATLAB environment. The S-Function code block of the electromagnetic transient simulation control algorithm model is converted into a Mexw64 file in a model conversion mode, and then the Mexw64 file is packaged into an FMU-ME file by using a C language code program based on an FMI standard. An electrical topology structure corresponding to the Simulink model is built in a target simulation platform. An FMI interface matching function of the FMU-ME file is called to convert output data of the target simulation platform according to the electrical topology structure into a data format supported by the FMU-ME file, and then the data is transmitted to an FMU main program for simulation calculation, and the simulation calculation result is converted into a data format supported by the target simulation platform and then transmitted to a control module in the target simulation platform to perform simulation control on the electrical topology structure. The S-Function code block of the electromagnetic transient simulation control algorithm model is converted into a Mexw64 file in a model conversion mode, including:
2. The method of claim 1, wherein, Under the FMI standard, the S-Function code block is loaded by using a binary MEX file; In the configuration parameters of the S-Function code block, the target language is selected as C code, and the simulation step length is set as a variable step length mode; According to the target language and the simulation step length, the S-Function code block is converted into a Mexw64 file. The FMU-ME file is developed based on an FMI standardized data interface.
3. The method of claim 1, wherein, The electromagnetic transient simulation control algorithm model can be reused in multiple target simulation platforms.
4. The method of claim 1, wherein, The output data of the target simulation platform includes control instructions of the electrical topology structure output by a control module in the target simulation platform.
5. The method of claim 1, wherein, The FMI interface matching function of the FMU-ME file is called to convert the output data of the target simulation platform according to the electrical topology structure into a data format supported by the FMU-ME file, and then the data is transmitted to an FMU main program for simulation calculation, including:
6. The method of claim 1, wherein, The output data of the target simulation platform is converted into a data format supported by the FMU-ME file according to the electrical topology structure; The FMI interface matching function of the FMU-ME file is called to trigger the FMU main program to perform simulation calculation according to the output data of the target simulation platform in the current time step. The application further comprises the following steps:
7. The cross-platform latency-free heterogeneous multiplexing method of electromagnetic transient model control algorithm according to any one of claims 1-6, characterized in that, Error evaluation is performed between the electrical topology structure of the Simulink model and the electrical topology structure simulated by the FMU-ME file, and an error evaluation result is generated; The error evaluation result is compared with theoretical values or experimental data to obtain a consistency test result of simulation results among different simulation platforms. The application comprises the following steps:
8. A cross-platform latency-free heterogeneous multiplexing system of an electromagnetic transient model control algorithm, characterized in that, A construction module is used to construct an electromagnetic transient simulation control algorithm model in a MATLAB environment by using an S-Function module, and the electromagnetic transient simulation control algorithm model is a Simulink model; The conversion module is configured to convert S-Function code blocks of the electromagnetic transient simulation control algorithm model into Mexw64 files in a model conversion mode, and then package the Mexw64 files into FMU-ME files using a C language code program based on the FMI standard; The building module is configured to build an electrical topology structure corresponding to the Simulink model in a target simulation platform; The interaction module is configured to call an FMI interface matching function of the FMU-ME file to convert output data of the target simulation platform according to the electrical topology structure into a data format supported by the FMU-ME file, and then transmit the data to a FMU main program for simulation calculation, and convert simulation calculation results into a data format supported by the target simulation platform, and then transmit the data to a control module in the target simulation platform to perform simulation control on the electrical topology structure.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the cross-platform, no-delay, and heterogeneous multiplexing method of the electromagnetic transient model control algorithm when executing the program. 10.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the cross-platform, no-delay, and heterogeneous multiplexing method of the electromagnetic transient model control algorithm when executed by the processor.