Multi-rate real-time simulation device, input interface modeling method and output interface modeling method

By designing input and output interfaces in a multi-rate real-time simulation device, data interaction and logic detection of large- and small-step simulation systems are realized, which solves the problem of inability to eliminate design errors in advance in the existing technology and improves simulation and testing. Efficiency and accuracy.

CN118607432AActive Publication Date: 2024-09-06ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410708149.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-09-06
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

In the existing technology, during multi-rate real-time simulation, system self-test and logic correction cannot be performed before the two simulation systems are spliced. As a result, design errors can only be performed after performance testing is spliced, resulting in a long development cycle and low efficiency.

Method used

Design a multi-rate real-time simulation device that connects the large-step simulation system and the small-step simulation system through the input interface and output interface to realize data interaction, and performs modeling and design on the input interface and output interface, allowing for the same development environment Detect and compare the correctness of logic design and numerical solution to eliminate design errors in advance.

Benefits of technology

A closed loop is formed through two data interaction links with different simulation step sizes, which improves simulation and testing efficiency, shortens the development and testing cycle, and ensures the accuracy of simulation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118607432A
    Figure CN118607432A
Patent Text Reader

Abstract

According to the multi-rate real-time simulation device, the input interface modeling method and the output interface modeling method, the device comprises a large-step simulation system, a small-step simulation system, the input interface and the output interface, and the two simulation systems can be jointly operated through the two interfaces. Wherein the input interface can be used for integrating input data of the large-step simulation system, and transmitting the integrated data to the small-step simulation system for simulation calculation; the output interface can extract output data of the small-step simulation system and transmit the extracted data to the large-step simulation system for simulation calculation. Therefore, the device can improve the system development and test efficiency through two data interaction links with different simulation step lengths. Besides, different interface modeling method designs are carried out on the two interfaces, the correctness of logic design in the device can be detected in the same development environment, design errors of the device in the development process are eliminated in advance, and the development period is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of real-time simulation of electric power systems, and in particular to a multi-rate real-time simulation device and an input interface and an output interface modeling method. Background Art

[0002] Real-time simulation technology is an effective tool for studying and understanding the characteristics of renewable energy and power electronic equipment, and for power system analysis and fault prevention. In multi-rate real-time simulation, a small-step simulation system is usually used in FPGA to simulate the parts with high simulation rate requirements at a fast rate, and a large-step simulation system is used in CPU to simulate the parts with low simulation rate requirements at a slow rate.

[0003] In the prior art, when performing multi-rate real-time simulation, two simulation systems need to be spliced ​​together heterogeneously through a real-time simulation hardware platform before the real-time model can be tested. However, this implementation cannot perform system self-testing and logic correction in the development simulation system. Once a design method and logic error occurs, performance testing can only be performed after the two simulation systems are spliced ​​together. Design errors cannot be eliminated in advance, resulting in a long development cycle and low efficiency for the entire real-time simulation system and device. Summary of the invention

[0004] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defects in the prior art that performance testing can only be carried out after two simulation systems are spliced ​​together, and early design errors cannot be eliminated in advance, resulting in a long development cycle and low efficiency of the entire real-time simulation device.

[0005] The present application provides a multi-rate real-time simulation device, the device comprising a large-step simulation system, a small-step simulation system, an input interface and an output interface;

[0006] The large step length simulation system is connected to the small step length simulation system via the input interface and the output interface respectively;

[0007] The input interface is used to integrate the input data of the large-step simulation system to generate first simulation data, and transmit the first simulation data to the small-step simulation system so that the small-step simulation system performs simulation calculation on the first simulation data using the first simulation step;

[0008] The output interface is used to extract the output data of the small-step simulation system, generate second simulation data, and transmit the second simulation data to the large-step simulation system so that the large-step simulation system uses the second simulation step to perform simulation calculations on the second simulation data.

[0009] Optionally, the second simulation step length is N times the first simulation step length, where N is a positive integer; the device further includes a counter;

[0010] The counter is used to count with the first simulation step length as a period after the simulation of the multi-rate real-time simulation device starts, and reset the count value to 0 after the count value reaches N-1.

[0011] Optionally, the device further comprises a synchronization module;

[0012] The synchronization module is used to output a synchronization signal between the large step length simulation system and the small step length simulation system;

[0013] The synchronization signal is represented as a high level when the count value of the counter is equal to 0, and is represented as a low level when the count value of the counter is not equal to 0.

[0014] The present application also provides an input interface modeling method, which is applied to the input interface of a multi-rate real-time simulation device, and the method comprises:

[0015] When receiving input data of the large-step simulation system, determining initial enable information and initial data information of the input data, reading the count value of the counter in the multi-rate real-time simulation device in real time, and judging whether the input data is continuous;

[0016] If yes, updating the initial enabling information and the initial data information according to the count value to obtain final enabling information and final data information;

[0017] If not, numerically solving the count value based on a preset splitting factor, and updating the initial enabling information and the initial data information according to the solving result to obtain final enabling information and final data information;

[0018] The final enabling information and the final data information are integrated according to a bit integration method to generate first simulation data, and the first simulation data is transmitted to a small-step simulation system.

[0019] Optionally, the determining the initial enabling information and initial data information of the input data includes:

[0020] Performing information distribution on the input data to generate enabling information and data information;

[0021] When the synchronization module in the multi-rate real-time simulation device outputs a low-level signal, data initialization is performed on the enable information and the data information to obtain initial enable information and initial data information.

[0022] Optionally, updating the initial enabling information and the initial data information according to the count value to obtain final enabling information and final data information includes:

[0023] When the count value is 1, the initial enabling information is assigned a value of 1 to obtain final enabling information, and the initial data information is assigned a value of the input data to obtain final data information;

[0024] When the count value is not 1, the initial enabling information is assigned a value of 0 to obtain final enabling information, and the initial data information is assigned a value of 0 to obtain final data information.

[0025] Optionally, the performing numerical solution on the count value based on a preset splitting factor includes:

[0026] The count value is divided by a preset splitting factor to obtain an integer value and a remainder value in the division result.

[0027] Optionally, updating the initial enabling information and the initial data information according to the solution result to obtain final enabling information and final data information includes:

[0028] Determine whether the input data satisfies the condition that the integer value is 1 and the remainder value is less than the data length of the input data;

[0029] If so, add 1 to the remainder value to obtain an extraction position, extract a value from the input data based on the extraction position, assign the extraction result to the initial data information to obtain final data information, and assign 1 to the initial enable information to obtain final enable information;

[0030] If not, the initial enabling information is assigned a value of 0 to obtain final enabling information, and the initial data information is assigned a value of 0 to obtain final data information.

[0031] The present application also provides an output interface modeling method, which is applied to the output interface of a multi-rate real-time simulation device, and the method comprises:

[0032] When receiving output data of the small-step simulation system, extracting the enable information and data information of the output data, performing format conversion on the data information, and generating conversion information;

[0033] Determining whether the output data is continuous;

[0034] If yes, integrating the enabling information and the conversion information according to a bit integration method to generate initial simulation data;

[0035] If not, reading the count value of the counter in the multi-rate real-time simulation device in real time, and determining the initial simulation data according to the count value and the enabling information;

[0036] The initial simulation data is converted into a data format to obtain second simulation data, and the second simulation data is transmitted to the large-step simulation system.

[0037] Optionally, determining the initial simulation data according to the count value and the enabling information includes:

[0038] Determine whether the output data satisfies the condition that the enable information is 1 and the count value is greater than 0;

[0039] If yes, the conversion information is used as initial simulation data;

[0040] If not, the step delay mechanism is triggered to update the enable information and the count value, and return to determine whether the output data meets the condition that the enable information is 1 and the count value is greater than 0 and subsequent steps.

[0041] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0042] The multi-rate real-time simulation device and input interface and output interface modeling method provided by the present application, the device includes a large-step simulation system, a small-step simulation system, an input interface and an output interface, and the large-step simulation system is connected to the small-step simulation system through the input interface and the output interface respectively. Among them, the input interface can integrate the input data of the large-step simulation system, generate the first simulation data, and then transmit the first simulation data to the small-step simulation system, so that the small-step simulation system uses the first simulation step to simulate the first simulation data; and the output interface can extract the output data of the small-step simulation system, generate the second simulation data, and transmit the second simulation data to the large-step simulation system, so that the large-step simulation system uses the second simulation step to simulate the second simulation data. Therefore, the device can form a closed loop through two data interaction links with different simulation steps, thereby improving the simulation and test efficiency. In addition, the present application performs interface modeling design at the input interface and the output interface respectively, so that it can detect and compare the correctness of the logic design and numerical solution of the multi-rate simulation system in the same development environment, so that the design errors in the device development process can be eliminated in advance, and the development and testing cycle of the multi-rate real-time simulation device can be shortened. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0044] Figure 1 A schematic diagram of the structure of a multi-rate real-time simulation device provided in an embodiment of the present application;

[0045] Figure 2 A schematic diagram of a flow chart of an input interface modeling method provided in an embodiment of the present application;

[0046] Figure 3 A flowchart of an output interface modeling method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] In the prior art, when performing multi-rate real-time simulation, two simulation systems need to be spliced ​​together heterogeneously before the real-time model can be tested. However, this implementation cannot perform system self-testing and logic correction in the development simulation system. Once a design method and logic error occurs, performance testing can only be performed after the two simulation systems are spliced ​​together. Some early design errors cannot be eliminated, resulting in a long development cycle and low efficiency for the entire real-time simulation device.

[0049] In one embodiment, Figure 1 As shown, Figure 1 A schematic diagram of the structure of a multi-rate real-time simulation device provided in an embodiment of the present application; the present application provides a multi-rate real-time simulation device, including a large-step simulation system, a small-step simulation system, an input interface, and an output interface;

[0050] The large step length simulation system is connected to the small step length simulation system via the input interface and the output interface respectively;

[0051] The input interface is used to integrate the input data of the large-step simulation system to generate first simulation data, and transmit the first simulation data to the small-step simulation system so that the small-step simulation system performs simulation calculation on the first simulation data using the first simulation step;

[0052] The output interface is used to extract the output data of the small-step simulation system, generate second simulation data, and transmit the second simulation data to the large-step simulation system so that the large-step simulation system uses the second simulation step to perform simulation calculations on the second simulation data.

[0053] In this embodiment, the multi-rate real-time simulation device is mainly composed of a large-step simulation system and a small-step simulation system, and the large-step simulation system can exchange data with the small-step simulation system through two links, namely, an input interface and an output interface. Among them, the input interface is mainly responsible for data integration of the input data of the large-step simulation system, generating first simulation data, and transmitting the first simulation data to the small-step simulation system, so that the small-step simulation system uses the first simulation step to perform simulation calculations on the first simulation data, and the output interface is mainly responsible for data extraction of the output data of the small-step simulation system, generating second simulation data, and transmitting the second simulation data to the large-step simulation system, so that the large-step simulation system uses the second simulation step to perform simulation calculations on the second simulation data.

[0054] It is understandable that a large-step simulation system is usually used to simulate relatively slowly changing parts of a system, or parts that do not require high real-time performance. Therefore, the second simulation step used in its simulation process is relatively large, so that it can quickly traverse the entire simulation time range, thereby quickly obtaining the overall behavior or long-term trend of the system; and a small-step simulation system is usually used to simulate parts of a system that change rapidly and have high real-time requirements. Therefore, the first simulation step used in its simulation process is relatively small, so that it can more accurately simulate the dynamic response and characteristics of the system, especially in scenarios with rapid changes or high-frequency fluctuations. Based on this, the present application can combine a large-step simulation system with a small-step simulation system to achieve a more efficient and accurate simulation effect.

[0055] Specifically, Figure 1 As shown, the part between the small ellipse and the large ellipse is the large-step simulation system, and the inside of the small ellipse is the small-step simulation system. When the large-step simulation system and the small-step simulation system interact with each other, the small-step simulation system can perform hundreds or even more simulation calculations within one simulation step of the large-step simulation system; and there are two data interaction links between the two step-size simulation systems, one is the large-step simulation system, the input interface, and the small-step simulation system, and the other is the small-step simulation system, the output interface, and the large-step simulation system.

[0056] Furthermore, the present application can also model and design the input interface so that the input interface can integrate the input data of the large-step simulation system, generate the first simulation data, and transmit the first simulation data to the small-step simulation system for simulation calculation; and model and design the output interface so that the output interface can extract the output data of the small-step simulation system, generate the second simulation data, and transmit the second simulation data to the large-step simulation system for calculation. The present application realizes the data interaction of two data interaction links through this method, so that the large-step simulation system and the small-step simulation system can perform logic design detection and comparison in the same development environment, thereby improving the simulation and test efficiency.

[0057] In the above embodiment, the device includes a large step simulation system, a small step simulation system, an input interface and an output interface, and the large step simulation system is connected to the small step simulation system through the input interface and the output interface. Among them, the input interface can integrate the input data of the large step simulation system, generate the first simulation data, and then transmit the first simulation data to the small step simulation system, so that the small step simulation system uses the first simulation step to perform simulation calculation on the first simulation data; and the output interface can extract the output data of the small step simulation system, generate the second simulation data, and transmit the second simulation data to the large step simulation system, so that the large step simulation system uses the second simulation step to perform simulation calculation on the second simulation data. Therefore, the device can form a closed loop through two data interaction links with different simulation steps, thereby improving the simulation and test efficiency. In addition, the present application performs interface modeling design at the input interface and the output interface respectively, so that it can detect and compare the correctness of the logic design and numerical solution of the multi-rate simulation device in the same development environment, so that the design errors in the device development process can be eliminated in advance, and the development and testing cycle of the multi-rate real-time simulation device can be shortened.

[0058] In one embodiment, the second simulation step length is N times the first simulation step length, where N is a positive integer; the device further includes a counter;

[0059] The counter is used to count with the first simulation step length as a period after the simulation of the multi-rate real-time simulation device starts, and reset the count value to 0 after the count value reaches N-1.

[0060] In this embodiment, the multi-rate real-time simulation device also includes a counter. Since in the multi-rate real-time simulation device, the second simulation step of the large-step simulation system is N times the first simulation step of the small-step simulation system, where N is a positive integer. Therefore, after the multi-rate real-time simulation device starts emulating, the counter can count from 0 with the first simulation step as a cycle until the count value reaches N-1 and then reset the count value to 0.

[0061] It can be understood that in order to coordinate the simulation progress of the two simulation systems and track the number of simulation steps of the small-step simulation system, the present application introduces a counter, which can count with the first simulation step of the small-step simulation system as a small cycle, that is, each time the small-step simulation system completes a step of simulation, the counter increases by 1; at the same time, the counter can also be reset with the second simulation step of the large-step simulation system as a large cycle, that is, each time the large-step simulation system completes a step of simulation, the counter is reset to 0. Therefore, the present application can ensure the synchronization and coordination of data interaction between the two simulation systems through the counter, thereby improving the correctness of numerical solutions and simulation results during the simulation process.

[0062] For example, when the first simulation step is 0.00000001s, i.e. 10 nanoseconds, and the second simulation step is 0.000001s, i.e. 1 microsecond, the multiple N between the two is 100. At this time, the counter starts counting from 0 at the start of the simulation, steps by 1 every 10 nanoseconds, counts to 99 and starts again from 0 and repeats the cycle. The count value output by the counter varies in the range of 0, 1, 2, ..., 98, 99, 0, 1, 2, ..., and repeats the cycle.

[0063] In one embodiment, the apparatus further comprises a synchronization module;

[0064] The synchronization module is used to output a synchronization signal between the large-step simulation system and the small-step simulation system; wherein the synchronization signal is represented as a high level when the count value of the counter is equal to 0, and is represented as a low level when the count value of the counter is not equal to 0.

[0065] In this embodiment, the multi-rate real-time simulation device also includes a synchronization module, which can output a high-level synchronization signal and assign a value of 1 when the count value of the counter is 0 during the simulation process of the multi-rate real-time simulation device, thereby indicating that data simulation is being performed synchronously between the large-step simulation system and the small-step simulation system at this moment; and, the synchronization module can output a low-level synchronization signal and assign a value of 0 when the count value of the counter is not 0 during the simulation process of the multi-rate real-time simulation device, thereby indicating that data simulation is not being performed between the large-step simulation system and the small-step simulation system at this moment.

[0066] It is understandable that in a multi-rate real-time simulation environment, since the large-step simulation system and the small-step simulation system perform simulations at different rates, it is very important to maintain data synchronization and timing coordination between them. Therefore, the present application can provide a clear synchronization signal through a synchronization module to ensure that each simulation system can accurately understand when to exchange data, when to start or stop simulation, and other key operations during the simulation process, thereby improving the correctness of numerical solutions and simulation results during the simulation process.

[0067] In one embodiment, Figure 2 As shown, Figure 2 A flow chart of an input interface modeling method provided in an embodiment of the present application; the present application also provides an input interface modeling method, which is applied to the input interface of a multi-rate real-time simulation device, and specifically includes the following:

[0068] S110: When receiving input data of the large-step simulation system, determining initial enable information and initial data information of the input data, reading the count value of the counter in the multi-rate real-time simulation device in real time, and judging whether the input data is continuous.

[0069] S120: If it is continuous, the initial enabling information and the initial data information are updated according to the count value to obtain the final enabling information and the final data information;

[0070] S130: If it is not continuous, numerically solve the count value based on a preset splitting factor, and update the initial enabling information and the initial data information according to the solution result to obtain the final enabling information and the final data information.

[0071] S140: Integrate the final enabling information and the final data information according to the bit integration method to generate first simulation data, and transmit the first simulation data to the small step simulation system.

[0072] In this embodiment, when the input interface receives input data of the large-step simulation system, it can determine the initial enable information and initial data information of the input data, and read the count value of the counter in the multi-rate real-time simulation device in real time. At the same time, the input interface can also determine whether the input data is continuous, and then select the corresponding processing strategy based on the judgment result to generate the first simulation data, so as to improve the correctness of the numerical solution and thus improve the simulation efficiency.

[0073] It can be understood that when the input interface receives only one data point or data packet within one simulation step, that is, the length of the received input data is 1, it means that the data is transmitted continuously. In this case, the data point or data packet may contain all the necessary information required for the simulation, and no part is lost due to interruption or delay; when the input interface receives multiple data points or data packets within one simulation step, that is, the length of the received input data is greater than 1, it means that the data is not transmitted continuously, or there is some form of splitting or reorganization. In this case, the received data points or data packets need to be recombined or processed to restore the integrity and continuity of the original data.

[0074] Therefore, if the length of the input data is equal to 1, it means that the input data is continuous. At this time, the input interface can update the initial enable information and initial data information according to the count value to obtain the final enable information and final data information; if the length of the input data is greater than 1, it means that the input data is discontinuous. At this time, the input interface can numerically solve the count value based on the preset splitting factor, and update the initial enable information and initial data information according to the solution result to obtain the final enable information and final data information.

[0075] Among them, the preset splitting factor refers to a parameter used to describe how data is split or merged into different rates or time steps, which can be a characteristic number, a floating point or a more complex mathematical expression to ensure the temporal resolution and continuity of the data; in this application, the preset splitting factor can be set to a positive integer greater than 1 such as 2 or 3 to achieve the continuity of the input data.

[0076] Finally, after obtaining the final enabling information and final data information of the input data, the input interface can integrate the final enabling information and the final data information according to the bit integration method to generate the first simulation data, and transmit the first simulation data to the small step simulation system. The bit integration method refers to a data processing technology for combining multiple binary bits into a larger binary number, so the left side of the first simulation data is the highest bit; in the information integration process, the input interface can integrate the information in the form of the valid bit of the final enabling information as the highest bit and the final data information as the remaining bits to obtain the first simulation data.

[0077] In one embodiment, determining the initial enabling information and initial data information of the input data in step S110 may include:

[0078] S111: Allocate information to the input data to generate enable information and data information.

[0079] S112: when the synchronization module in the multi-rate real-time simulation device outputs a low-level signal, data initialization is performed on the enable information and the data information to obtain initial enable information and initial data information.

[0080] In this embodiment, when the input interface determines the initial enable information and initial data information of the input data, it can first allocate information on the input data to generate enable information and data information, and when the synchronization module in the real-time rate simulation device outputs a low-level signal, initialize the enable information and data information to obtain the initial enable information and initial data information.

[0081] Among them, data information refers to the data content actually to be transmitted or processed in the multi-rate real-time simulation device, which can be various types of data, such as voltage, current, control signal or position information, etc. The enable information refers to the information used to indicate whether the corresponding data information is valid or should be processed, which is usually a signal, flag or variable; in this application, when the enable information is set to 1, it means that the corresponding data information is valid and can be processed or transmitted. On the contrary, when the enable information is set to 0, it means that the corresponding data information is invalid and can be ignored.

[0082] It can be understood that before a new round of simulation of the large-step simulation system and the small-step simulation system of the multi-rate real-time simulation device starts, that is, when the synchronization module outputs a low-level signal, the input interface can initialize the enable information and data information to obtain the initial enable information and initial data information, thereby adjusting the multi-rate real-time simulation device to a known and accurate state, laying the foundation for the accuracy and reliability of the entire multi-rate real-time simulation device.

[0083] Specifically, when initializing data, for enable information, the input interface can adjust it to an invalid state, that is, set it to 0 to indicate that the data information is not ready or invalid; and for data information, the input interface can set it to a zero value, a default value or an initial value, without limitation here.

[0084] For example, when the input signal received by the input interface includes a voltage signal U and a current signal I, an enable signal Uen, Ien and a data signal Udn, Idn can be pre-assigned to each data, and when the synchronization signal is 0, the enable signal and the data signal are initialized, that is, Uen=0, Ien=0 are used as the initial enable information Xen, and Udn=0, Idn=0 are used as the initial data information Xdn.

[0085] In one embodiment, in step S120, the initial enabling information and the initial data information are updated according to the count value to obtain the final enabling information and the final data information, which may include:

[0086] S121: When the count value is 1, the initial enable information is assigned to 1 to obtain the final enable information, and the initial data information is assigned to the input data to obtain the final data information.

[0087] S122: When the count value is not 1, the initial enable information is assigned a value of 0 to obtain the final enable information, and the initial data information is assigned a value of 0 to obtain the final data information.

[0088] In this embodiment, when the input interface updates the initial enabling information and the initial data information, the input interface may select a corresponding assignment method according to the size of the count value to update the information. For example, when the count value is 1, the input interface may assign the initial enabling information to 1 to obtain the final enabling information, and assign the initial data information to input data to obtain the final data information; when the count value is not 1, the input interface may assign the initial enabling information to 0 to obtain the final enabling information, and assign the initial data information to 0 to obtain the final data information.

[0089] It can be understood that since the large-step simulation system only simulates and calculates once within the duration of the second simulation step, and within the second simulation step, the small-step simulation system needs to perform N simulation calculations, therefore, when the input interface inputs the first simulation data into the small-step simulation system for simulation calculation, it only needs to be updated once within the duration of the second simulation step. Therefore, a count value of 1 indicates the beginning of a new large-step simulation cycle, and the first simulation data has been updated. At this time, the input interface can assign the initial enable information to 0 to obtain the final enable information to indicate that the corresponding final data information is valid.

[0090] In one embodiment, the numerical solution of the count value based on the preset splitting factor in step S130 may include:

[0091] S131: Divide the count value by a preset splitting factor to obtain an integer value and a remainder value in the division result.

[0092] In this embodiment, when the input interface numerically solves the count value, the count value can be divided by a preset splitting factor to obtain an integer value and a remainder value in the division result, and then the initial enable information and initial data information can be updated according to the integer value and the remainder value.

[0093] It can be understood that in a multi-rate real-time simulation device, the second simulation step of the large-step simulation system is N times the first simulation step of the small-step simulation system. Therefore, the integer value can map the data of the large-step simulation system to the timeline of the small-step simulation system. Through the integer value, the input interface can determine the corresponding position or time step of the input data in the small-step system; the remainder value can fine-tune the position of the input data in the small-step system.

[0094] In one embodiment, in step S130, the initial enabling information and the initial data information are updated according to the solution result to obtain the final enabling information and the final data information, which may include:

[0095] S132: Determine whether the input data satisfies the condition that the integer value is 1 and the remainder value is less than the data length of the input data.

[0096] S133: If satisfied, add the remainder value to 1 to obtain the extraction position, extract the value from the input data based on the extraction position, assign the extraction result to the initial data information to obtain the final data information, and assign the initial enable information to 1 to obtain the final enable information.

[0097] S134: If not satisfied, the initial enabling information is assigned a value of 0 to obtain the final enabling information, and the initial data information is assigned a value of 0 to obtain the final data information.

[0098] In this embodiment, after calculating the solution result of the counting value, the input interface can also judge whether the input data satisfies the conditions that the integer value is 1 and the remainder value is less than the data length of the input data based on the solution result, and then use the corresponding assignment method to update the information based on the judgment result, so as to obtain the final enabling information and final data information.

[0099] Specifically, when the input data satisfies the condition that the integer value is 1 and the remainder value is less than the data length of the input data, it indicates that the input data of the small-step simulation system in the new round of large-step simulation cycle has not been updated. At this time, the input interface can select the corresponding element from the sequence of the input data as the final data information. In the present application, the input interface can add the remainder value to 1 to obtain the extraction position, and then extract the value from the input data based on the extraction position, and assign the extraction result to the initial data information to obtain the final data information; at the same time, the input interface can also assign the initial enable information to 1 to obtain the final enable information to indicate that the final data information is valid. When the input data does not meet the condition that the integer value is 1 and the remainder value is less than the data length of the input data, it indicates that the input data of the small-step simulation system in the new round of large-step simulation cycle has not been updated, so the input interface assigns the initial enable information to 0 to obtain the final enable information, and assigns the initial data information to 0 to obtain the final data information to indicate that the final data information is invalid.

[0100] In one embodiment, Figure 3 As shown, Figure 3 A flow chart of an output interface modeling method provided in an embodiment of the present application; the present application also provides an output interface modeling method, which is applied to the output interface of a multi-rate real-time simulation device, and may specifically include:

[0101] S210: When output data of the small-step simulation system is received, the enable information and data information of the output data are extracted, and the format of the data information is converted to generate conversion information.

[0102] S220: Determine whether the output data is continuous;

[0103] S230: If they are continuous, integrate the enabling information and the conversion information according to a bit integration method to generate initial simulation data.

[0104] S240: If it is not continuous, read the count value of the counter in the multi-rate real-time simulation device in real time, and determine the initial simulation data according to the count value and the enable information.

[0105] S250: Convert the data format of the initial simulation data to obtain second simulation data, and transmit the second simulation data to the large-step simulation system.

[0106] In this embodiment, when the output interface receives the output data of the small step simulation system, the enable information and data information carried in the output data can be extracted, and the data information can be formatted to generate conversion information. At the same time, the output interface can also determine whether the output data is continuous, and then the corresponding processing strategy can be selected according to the judgment result to generate initial simulation data, so as to improve the correctness of the numerical solution and thus improve the simulation efficiency. Among them, the continuity judgment process of the output data is consistent with the input data of the input interface, and will not be repeated here.

[0107] Specifically, when the output data is continuous, the output interface can integrate the enabling information and the conversion information according to the bit integration method to generate initial simulation data; when the output data is discontinuous, the output interface can read the count value of the counter in the multi-rate real-time simulation device in real time, and determine the initial simulation data according to the count value and the enabling information. Finally, the output interface can perform data format conversion on the initial simulation data to obtain second simulation data, and transmit the second simulation data to the large step simulation system so that the large step simulation system can perform simulation calculation.

[0108] In one embodiment, determining the initial simulation data according to the count value and the enabling information in step S240 may include:

[0109] S241: Determine whether the output data meets the condition that the enable information is 1 and the count value is greater than 0.

[0110] S242: If satisfied, the conversion information is used as initial simulation data.

[0111] S243: If not, the step delay mechanism is triggered to update the enable information and the count value, and return to determine whether the output data meets the condition that the enable information is 1 and the count value is greater than 0 and its subsequent steps.

[0112] In this embodiment, after determining the count value and the enabling information, the output interface can also determine whether the output data meets the condition that the enabling information is 1 and the count value is greater than 0, and then use the corresponding processing strategy to determine the initial simulation data according to the judgment result. For example, when the output data meets the condition, the conversion information can be directly used as the initial simulation data; when the output data does not meet the condition, the step delay mechanism can be triggered to update the enabling information and the count value, and return to determine whether the output data meets the condition that the enabling information is 1 and the count value is greater than 0 and the subsequent steps, until the enabling information and the count value meet the condition, and the initial simulation data is obtained.

[0113] It is understandable that, in a multi-rate real-time simulation device, the second simulation step of the large-step simulation system is N times the first simulation step of the small-step simulation system. In other words, within the duration of the second simulation step, the output interface can receive and transmit the output data of the small-step simulation system N times, and transmit the second simulation data once to the large-step simulation system. Therefore, when the output data does not meet the conditions that the enable information is 1 and the count value is greater than 0, it means that the second simulation data transmitted by the output interface is invalid and / or the simulation calculation of the current round of the large-step simulation system has not ended, and it is still not necessary to receive the second simulation data to enter a new round of simulation calculation. At this time, the output interface can trigger the step delay mechanism to allow the small-step simulation system to perform another round of simulation calculation until the simulation calculation of the current round of the large-step simulation system ends.

[0114] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0115] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

[0116] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A multi-rate real-time simulation device, characterized in that: The device comprises a large step length simulation system, a small step length simulation system, an input interface and an output interface; The large step length simulation system is connected to the small step length simulation system via the input interface and the output interface respectively; The input interface is used to integrate the input data of the large-step simulation system to generate first simulation data, and transmit the first simulation data to the small-step simulation system so that the small-step simulation system performs simulation calculation on the first simulation data using the first simulation step; The output interface is used to extract the output data of the small-step simulation system, generate second simulation data, and transmit the second simulation data to the large-step simulation system so that the large-step simulation system uses the second simulation step to perform simulation calculations on the second simulation data.

2. The multi-rate real-time simulation device according to claim 1, characterized in that: The second simulation step length is N times the first simulation step length, where N is a positive integer; the device further includes a counter; The counter is used to count with the first simulation step length as a period after the simulation of the multi-rate real-time simulation device starts, and reset the count value to 0 after the count value reaches N-1.

3. The multi-rate real-time simulation device according to claim 2, characterized in that: The device also includes a synchronization module; The synchronization module is used to output a synchronization signal between the large step length simulation system and the small step length simulation system; The synchronization signal is represented as a high level when the count value of the counter is equal to 0, and is represented as a low level when the count value of the counter is not equal to 0.

4. An input interface modeling method, applied to the input interface of a multi-rate real-time simulation device, characterized in that: The method comprises: When receiving input data of the large-step simulation system, determining initial enable information and initial data information of the input data, reading the count value of the counter in the multi-rate real-time simulation device in real time, and judging whether the input data is continuous; If yes, updating the initial enabling information and the initial data information according to the count value to obtain final enabling information and final data information; If not, numerically solving the count value based on a preset splitting factor, and updating the initial enabling information and the initial data information according to the solving result to obtain final enabling information and final data information; The final enabling information and the final data information are integrated according to a bit integration method to generate first simulation data, and the first simulation data is transmitted to a small-step simulation system.

5. The input interface modeling method according to claim 4, characterized in that: The determining of the initial enabling information and initial data information of the input data includes: Performing information distribution on the input data to generate enabling information and data information; When the synchronization module in the multi-rate real-time simulation device outputs a low-level signal, data initialization is performed on the enable information and the data information to obtain initial enable information and initial data information.

6. The input interface modeling method according to claim 4, characterized in that: The updating of the initial enabling information and the initial data information according to the count value to obtain final enabling information and final data information includes: When the count value is 1, the initial enabling information is assigned a value of 1 to obtain final enabling information, and the initial data information is assigned a value of the input data to obtain final data information; When the count value is not 1, the initial enabling information is assigned a value of 0 to obtain final enabling information, and the initial data information is assigned a value of 0 to obtain final data information.

7. The input interface modeling method according to claim 4, characterized in that: The numerically solving the count value based on the preset splitting factor includes: The count value is divided by a preset splitting factor to obtain an integer value and a remainder value in the division result.

8. The input interface modeling method according to claim 7, characterized in that: The updating of the initial enabling information and the initial data information according to the solution result to obtain the final enabling information and the final data information includes: Determine whether the input data satisfies the condition that the integer value is 1 and the remainder value is less than the data length of the input data; If so, add 1 to the remainder value to obtain an extraction position, extract a value from the input data based on the extraction position, assign the extraction result to the initial data information to obtain final data information, and assign 1 to the initial enable information to obtain final enable information; If not, the initial enabling information is assigned a value of 0 to obtain final enabling information, and the initial data information is assigned a value of 0 to obtain final data information.

9. An output interface modeling method, applied to the output interface of a multi-rate real-time simulation device, characterized in that: The method comprises: When receiving output data of the small-step simulation system, extracting the enable information and data information of the output data, performing format conversion on the data information, and generating conversion information; Determining whether the output data is continuous; If yes, integrating the enabling information and the conversion information according to a bit integration method to generate initial simulation data; If not, reading the count value of the counter in the multi-rate real-time simulation device in real time, and determining the initial simulation data according to the count value and the enabling information; The initial simulation data is converted into a data format to obtain second simulation data, and the second simulation data is transmitted to the large-step simulation system.

10. The output interface modeling method according to claim 9, characterized in that: The determining of initial simulation data according to the count value and the enabling information includes: Determine whether the output data satisfies the condition that the enable information is 1 and the count value is greater than 0; If yes, the conversion information is used as initial simulation data; If not, the step delay mechanism is triggered to update the enable information and the count value, and return to determine whether the output data meets the condition that the enable information is 1 and the count value is greater than 0 and subsequent steps.

Citation Information

Patent Citations

  • FPGA based small step real-time simulation system

    CN105005652A

  • Multi-rate interface method and apparatus for real-time simulation of power system

    CN106951646A

  • Electro-magnetic transient small-step simulation method and system

    CN108628182A

  • Converter station layered simulation test system

    CN110851998A

  • Electromagnetic transient simulation device for alternating-current and direct-current power system

    CN111596567A