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

By introducing data interaction interfaces between large-step and small-step simulation systems into a multi-rate real-time simulation device, the problem of not being able to detect design errors in advance in existing technologies is solved, and a more efficient simulation and testing process is achieved.

CN118607432BActive Publication Date: 2026-01-13ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, multi-rate real-time simulation devices can only perform performance testing after the simulation system is assembled, which makes it impossible to eliminate design errors in advance, resulting in long development cycles and low efficiency.

Method used

A large-step simulation system and a small-step simulation system are connected through input and output interfaces respectively to achieve data interaction and logic correction, forming a closed loop and supporting the detection of design errors in the same development environment.

Benefits of technology

By designing input and output interfaces, design errors can be identified and corrected in advance during development, shortening the development and testing cycle and improving simulation and testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118607432B_ABST
    Figure CN118607432B_ABST
Patent Text Reader

Abstract

The application provides a multi-rate real-time simulation device and an input interface and an output interface modeling method. The device comprises a large-step simulation system, a small-step simulation system, an input interface and an output interface. The two simulation systems can be jointly operated through the two interfaces. The input interface can integrate the input data of the large-step simulation system and transmit the integrated data to the small-step simulation system for simulation calculation. The output interface can extract the 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 steps. In addition, the application adopts different interface modeling methods in the two interfaces, so that the correctness of the logic design in the device can be detected in the same development environment, the design errors of the device in the development process can be excluded in advance, and the development cycle 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 power system real-time simulation, and particularly relates to a multi-rate real-time simulation device and an input interface and output interface modeling method. BACKGROUND

[0002] Real-time simulation technology is an effective tool for researching 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 perform fast-rate simulation on parts with high simulation rate requirements, and a large-step simulation system is used in CPU to perform slow-rate simulation on parts with low simulation rate requirements.

[0003] In the prior art, when performing multi-rate real-time simulation, two simulation systems need to be first spliced together through a real-time simulation hardware platform, and then real-time model testing can be performed. However, this implementation scheme cannot perform system self-testing and logic correction in the development of the simulation system. Once design methods and logic errors occur, performance detection can only be performed after the two simulation systems are spliced together, and early design errors cannot be excluded in advance, resulting in a long development cycle and low efficiency of the entire real-time simulation system and device. SUMMARY

[0004] The present application aims to at least solve one of the above technical defects, particularly the technical defect that in the prior art, performance detection can only be performed after the two simulation systems are spliced together, early design errors cannot be excluded in advance, and the development cycle of the entire real-time simulation device is long and inefficient.

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

[0006] The large-step simulation system is connected with the small-step simulation system through the input interface and the output interface, respectively.

[0007] The input interface is configured to integrate input data of the large-step simulation system, 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 by using a first simulation step.

[0008] The output interface is configured to extract 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 performs simulation calculation on the second simulation data by using a second simulation step.

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

[0010] The counter is configured to count in the first simulation step length after the multi-rate real-time simulation device starts simulation, and reset the count value to 0 when the count value is N-1.

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

[0012] The synchronization module is configured to output a synchronization signal between the large-step simulation system and the small-step simulation system.

[0013] The synchronization signal is high when the count value of the counter is 0, and low when the count value of the counter is not 0.

[0014] The application further provides an input interface modeling method applied to an input interface of a multi-rate real-time simulation device, the method comprising:

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

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

[0017] If no, solving the count value based on a preset split factor, and updating the initial enable information and the initial data information according to a solving result to obtain final enable information and final data information;

[0018] Integrating the final enable information and the final data information according to a bit integration method to generate first simulation data, and transmitting the first simulation data to a small-step simulation system.

[0019] Optionally, the determination of the initial enable information and the initial data information of the input data comprises:

[0020] Allocating information to the input data to generate enable information and data information;

[0021] Initializing the enable information and the data information to obtain initial enable information and initial data information when a synchronization module in the multi-rate real-time simulation device outputs a low-level signal.

[0022] Optionally, the information updating of the initial enable information and the initial data information according to the count value comprises:

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

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

[0025] Optionally, the numerical solution of the count value based on a preset split factor comprises:

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

[0027] Optionally, the information updating of the initial enable information and the initial data information according to the solution result comprises:

[0028] It is judged whether the input data satisfies a condition that the integer value is 1 and the remainder value is less than a data length of the input data.

[0029] If yes, the remainder value is added by 1 to obtain an extraction position, a numerical extraction is performed from the input data based on the extraction position, an extraction result is assigned to the initial data information to obtain final data information, and the initial enable information is assigned as 1 to obtain final enable information.

[0030] If no, the initial enable information is assigned as 0 to obtain final enable information, and the initial data information is assigned as 0 to obtain final data information.

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

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

[0033] It is judged whether the output data is continuous.

[0034] If yes, the enable information and the conversion information are information-integrated according to a bit integration method to generate initial simulation data.

[0035] If no, a count value of a counter in the multi-rate real-time simulation device is read in real time, and initial simulation data is determined according to the count value and the enable information;

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

[0037] Optionally, the initial simulation data is determined according to the count value and the enable information, comprising:

[0038] It is judged 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 taken as the initial simulation data.

[0040] If no, a step delay mechanism is triggered to update the enable information and the count value, and it is returned to judge whether the output data satisfies the condition that the enable information is 1 and the count value is greater than 0 and the subsequent steps.

[0041] From the above technical solutions, it can be seen that the embodiments of the present application have the following advantages:

[0042] The multi-rate real-time simulation device and the input interface and output interface modeling method provided by the present application, the device comprises a large-step simulation system, a small-step simulation system, an input interface and an output interface, the large-step simulation system is connected with the small-step simulation system through the input interface and the output interface. The input interface can integrate the input data of the large-step simulation system to generate first simulation data, and then 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 with a first simulation step; and the output interface can extract the output data of the small-step simulation system to generate second simulation data, and then transmit the second simulation data to the large-step simulation system, so that the large-step simulation system performs simulation calculation on the second simulation data with a second simulation step. 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 input interface and the output interface are respectively subjected to interface modeling design, so that the correctness of the logic design and the numerical solution of the multi-rate simulation system can be detected and compared in the same development environment, thereby the design errors in the development process of the device can be excluded in advance, and the development and test cycle of the multi-rate real-time simulation device is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description only represent some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor based on these drawings.

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

[0045] Figure 2 A flowchart of an input interface modeling method provided by an embodiment of the present application;

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

[0047] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments only represent 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 scope of the present application.

[0048] In the prior art, when performing multi-rate real-time simulation, two simulation systems need to be first spliced together to form a heterogeneous system, and then real-time model testing can be performed. However, this implementation scheme cannot perform system self-testing and logic correction in the development of the simulation system. Once design method and logic errors occur, performance detection can be performed only after the two simulation systems are spliced together, and some design errors in the early stage cannot be excluded, resulting in a long development cycle and low efficiency of the entire real-time simulation device.

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

[0050] The large-step simulation system is connected with the small-step simulation system through the input interface and the output interface respectively;

[0051] ​The input interface is used to integrate the input data of the large step size simulation system to generate first simulation data, and transmit the first simulation data to the small step size simulation system so that the small step size simulation system can perform simulation calculations on the first simulation data using the first simulation step size.

[0052] The output interface is used to extract data from 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 can perform simulation calculations on the second simulation data using the second simulation step size.

[0053] In this embodiment, the multi-rate real-time simulation device mainly consists of a large-step simulation system and a small-step simulation system. The large-step simulation system can interact with the small-step simulation system via two links: an input interface and an output interface. The input interface is primarily responsible for integrating the input data from the large-step simulation system to generate first simulation data, and then transmitting this first simulation data to the small-step simulation system. This allows the small-step simulation system to perform simulation calculations on the first simulation data using the first simulation step size. The output interface is primarily responsible for extracting the output data from the small-step simulation system to generate second simulation data, and then transmitting this second simulation data to the large-step simulation system. This allows the large-step simulation system to perform simulation calculations on the second simulation data using the second simulation step size.

[0054] Understandably, large-step simulation systems are typically used to simulate relatively slow-changing parts of a system, or parts with low real-time requirements. Therefore, they employ a larger second simulation step size to quickly traverse the entire simulation time range and rapidly obtain the overall behavior or long-term trend of the system. Conversely, small-step simulation systems are typically used to simulate rapidly changing parts of a system with high real-time requirements. Therefore, they employ a smaller first simulation step size to more accurately simulate the dynamic response and characteristics of the system, especially in rapidly changing or high-frequency fluctuating scenarios. Based on this, this application combines large-step and small-step simulation systems to achieve more efficient and accurate simulation results.

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

[0056] Furthermore, this application can also model and design the input interface so that it can integrate the input data from the large-step simulation system to generate 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 it can extract the output data from the small-step simulation system to generate second simulation data, and transmit the second simulation data to the large-step simulation system for calculation. This application achieves data interaction between the two data interaction links through this method, enabling the large-step simulation system and the small-step simulation system to perform logic design testing and comparison in the same development environment, thereby improving simulation and testing efficiency.

[0057] In the above embodiments, the device includes a large-step simulation system, a small-step simulation system, an input interface, and an output interface. The large-step simulation system is connected to the small-step simulation system through both the input and output interfaces. The input interface integrates the input data from the large-step simulation system to generate first simulation data, which is then transmitted to the small-step simulation system for simulation calculation using the first simulation step size. The output interface extracts the output data from the small-step simulation system to generate second simulation data, which is then transmitted to the large-step simulation system for simulation calculation using the second simulation step size. Therefore, the device can form a closed loop through two data interaction links with different simulation step sizes, thereby improving simulation and testing efficiency. Furthermore, this application performs interface modeling design on both the input and output interfaces, enabling the correctness of the logic design and numerical solution of the multi-rate simulation device to be detected and compared in the same development environment. This allows for the early elimination of design errors during device development, reducing the development and testing cycle of the multi-rate real-time simulation device.

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

[0059] The counter is used to count at the first simulation step size after the simulation of the multi-rate real-time simulation device starts, until the count value is N-1, and then the count value is reset to 0.

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

[0061] Understandably, this application introduces a counter to coordinate the simulation progress of the two simulation systems and track the simulation steps of the small-step simulation system. This counter counts with the first simulation step size of the small-step simulation system as its small cycle; that is, the counter increments by 1 each time the small-step simulation system completes a step. Simultaneously, the counter resets with the second simulation step size of the large-step simulation system as its large cycle; that is, the counter resets to 0 each time the large-step simulation system completes a step. Therefore, this application can use the counter to ensure the synchronization and coordination of data interaction between the two simulation systems, thereby improving the accuracy of numerical solutions and simulation results during the simulation process.

[0062] For example, when the first simulation step size is 0.00000001s (10 nanoseconds) and the second simulation step size is 0.000001s (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, increments by 1 every 10 nanoseconds, counts to 99, and then starts counting from 0 again in a loop. The range of the counter output value is 0, 1, 2, ..., 98, 99, 0, 1, 2, ..., in a loop.

[0063] In one embodiment, the device further includes a synchronization module;

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

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

[0066] Understandably, in multi-rate real-time simulation environments, since large-step and small-step simulation systems operate at different rates, maintaining data synchronization and timing coordination between them is crucial. Therefore, this application can provide a clear synchronization signal through a synchronization module, ensuring that each simulation system accurately understands when to exchange data, when to start or stop the simulation, and other critical operations during the simulation process, thereby improving the accuracy of numerical solutions and simulation results.

[0067] In one embodiment, such as Figure 2 As shown, Figure 2 This application provides a flowchart illustrating an input interface modeling method according to an embodiment of the present application. The application also provides an input interface modeling method applied to the input interface of a multi-rate real-time simulation device, specifically including the following:

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

[0069] S120: If continuous, update the initial enable information and initial data information according to the count value to obtain the final enable information and final data information;

[0070] S130: If it is not continuous, the count value is numerically solved based on the preset splitting factor, and the initial enable information and initial data information are updated according to the solution results to obtain the final enable information and final data information.

[0071] S140: The final enable information and final data information are integrated according to the bit integration method to generate the first simulation data, and the first simulation data is transmitted to the small step size simulation system.

[0072] In this embodiment, when the input interface receives input data from the large step size simulation system, it can determine the initial enable information and initial data information of the input data, as well as read the counter value 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 to generate the first simulation data based on the judgment result, so as to improve the accuracy of numerical solution and thus improve simulation efficiency.

[0073] Understandably, when the input interface receives only one data point or data packet within a simulation step, i.e., the length of the received input data is 1, it indicates 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 has been lost due to interruption or delay. When the input interface receives multiple data points or data packets within a simulation step, i.e., the length of the received input data is greater than 1, it indicates that the data is not transmitted continuously, or there is some form of splitting or reassembly. 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 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] The preset split factor refers to a parameter used to describe how data is split or merged into different rates or time steps. It can be an eigenvalue, a floating-point number, or a more complex mathematical expression to ensure the temporal resolution and continuity of the data. In this application, the preset split 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 enable information and final data information from the input data, the input interface can integrate the final enable information and final data information according to the bit integration method to generate the first simulation data, and then transmit this first simulation data to the small-step simulation system. The bit integration method refers to a data processing technique used to combine multiple binary bits into a larger binary number; therefore, the leftmost bit of the first simulation data is the most significant bit. During the information integration process, the input interface can integrate the information using the valid bit of the final enable information as the most significant bit and the remaining bits of the final data information to obtain the first simulation data.

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

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

[0079] S112: When the synchronization module outputs a low-level signal in the multi-rate real-time simulation device, the enable information and data information are initialized to obtain the initial enable information and initial data information.

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

[0081] In this context, "data information" refers to the actual data content to be transmitted or processed in the multi-rate real-time simulation device. This data can be of various types, such as voltage, current, control signals, or position information. "Enable information" indicates whether the corresponding data information is valid or should be processed; it is typically a signal, flag, or variable. In this application, when the enable information is set to 1, it indicates that the corresponding data information is valid and can be processed or transmitted. Conversely, when the enable information is set to 0, it indicates that the corresponding data information is invalid and can be ignored.

[0082] Understandably, before a new round of simulation begins in the large-step simulation system and the small-step simulation system of the multi-rate real-time simulation device, 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. This allows the multi-rate real-time simulation device to be adjusted 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, during data initialization, the input interface can set the enable information to an invalid state, i.e., set it to 0, to indicate that the data information is not ready or invalid; while for the data information, the input interface can set it to a zero value, a default value, or an initial value, without any restrictions.

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

[0085] In one embodiment, updating the initial enable information and initial data information based on the count value in step S120 to obtain the final enable information and final data information 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 set to 0 to obtain the final enable information, and the initial data information is set to 0 to obtain the final data information.

[0088] In this embodiment, when updating the initial enable information and initial data information, the input interface can select the appropriate assignment method based on the size of the count value. For example, when the count value is 1, the input interface can assign the initial enable information to 1 to obtain the final enable information, and assign the initial data information to the input data to obtain the final data information; when the count value is not 1, the input interface can assign the initial enable information to 0 to obtain the final enable information, and assign the initial data information to 0 to obtain the final data information.

[0089] Understandably, since the large-step simulation system only performs one simulation calculation within the duration of the second simulation step, while the small-step simulation system needs to perform N simulation calculations within the second simulation step, the input interface only needs to be updated once within the duration of the second simulation step when inputting the first simulation data to the small-step simulation system for simulation calculation. Therefore, a count value of 1 indicates the start 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, thus indicating that the corresponding final data information is valid.

[0090] In one embodiment, step S130, which involves numerically solving the count value based on a preset splitting factor, may include:

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

[0092] In this embodiment, when the input interface performs numerical calculation on the count value, it can divide the count value by a preset splitting factor to obtain the integer value and the remainder value in the division result. Then, the initial enable information and initial data information can be updated based on the integer value and the remainder value.

[0093] Understandably, in a multi-rate real-time simulation device, the second simulation step size of a large-step simulation system is N times the first simulation step size of a small-step simulation system. Therefore, this integer value can map the data from the large-step simulation system to the timeline of the small-step simulation system. Through this 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, updating the initial enable information and initial data information based on the solution result in step S130 to obtain the final enable information and final data information 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 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 enable information is set to 0 to obtain the final enable information, and the initial data information is set to 0 to obtain the final data information.

[0098] In this embodiment, after the input interface calculates the result of the count value, it can also determine whether the input data meets the condition that the integer value is 1 and the remainder value is less than the data length of the input data based on the result. Then, based on the determination result, the corresponding assignment method is used to update the information, thereby obtaining the final enable information and the final data information.

[0099] Specifically, when the input data satisfies the condition that the integer value is 1 and the remainder is less than the length of the input data, it indicates that the input data of the small-step simulation system has not been updated in the new round of large-step simulation. At this time, the input interface can select the corresponding element from the sequence of input data as the final data information. In this application, the input interface can add the remainder 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, indicating that the final data information is valid. When the input data does not satisfy the condition that the integer value is 1 and the remainder is less than the length of the input data, it indicates that the input data of the small-step simulation system has not been updated in the new round of large-step simulation. Therefore, 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, indicating that the final data information is invalid.

[0100] In one embodiment, such as Figure 3 As shown, Figure 3 This application provides a flowchart illustrating an output interface modeling method according to an embodiment of the present application; the present application also provides an output interface modeling method applied to the output interface of a multi-rate real-time simulation device, which may specifically include:

[0101] S210: When the output data of the small step size simulation system is received, the enable information and data information of the output data are extracted, the data information is converted into a format, and conversion information is generated.

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

[0103] S230: If continuous, the enable information and conversion information are integrated according to the bit integration method to generate initial simulation data.

[0104] S240: If the simulation is not continuous, the counter value in the multi-rate real-time simulation device is read in real time, and the initial simulation data is determined based on the counter value and the enable information.

[0105] S250: Convert the initial simulation data into a data format to obtain the second simulation data, and then transmit the second simulation data to the large step size simulation system.

[0106] In this embodiment, when the output interface receives the output data from the small-step simulation system, it can extract the enable information and data information carried in the output data, and convert the data information to generate conversion information. Simultaneously, the output interface can also determine whether the output data is continuous, and then select an appropriate processing strategy to generate initial simulation data based on the determination result, thereby improving the accuracy of the numerical solution and thus improving simulation efficiency. The process for determining the continuity of the output data is consistent with the process for determining the input data of the input interface, and will not be elaborated here.

[0107] Specifically, when the output data is continuous, the output interface can integrate the enable and conversion information using a bit-level integration method to generate initial simulation data. When the output data is discontinuous, the output interface can read the counter value in the multi-rate real-time simulation device in real time and determine the initial simulation data based on the counter value and enable information. Finally, the output interface can convert the initial simulation data into a data format to obtain second simulation data, and transmit the second simulation data to the large-step simulation system for simulation calculation.

[0108] In one embodiment, determining the initial simulation data based on the count value and enable 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 will be used as the initial simulation data.

[0111] S243: If not satisfied, trigger the step delay mechanism to update the enable information and count value, and return to determine whether the output data satisfies 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 enable information, the output interface can also determine whether the output data meets the condition that the enable information is 1 and the count value is greater than 0. Based on the determination result, an appropriate processing strategy is adopted to determine the initial simulation data. 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, a step delay mechanism can be triggered to update the enable information and 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 follow up with subsequent steps, until the enable information and count value meet the condition, thus obtaining the initial simulation data.

[0113] Understandably, in a multi-rate real-time simulation device, the second simulation step size of a large-step simulation system is N times the first simulation step size of a small-step simulation system. In other words, within the duration of the second simulation step size, the output interface can receive and transmit the output data of the small-step simulation system N times, and transmit the second simulation data to the large-step simulation system once. Therefore, if the output data does not meet the conditions that the enable information is 1 and the count value is greater than 0, it indicates 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 yet ended, and it is 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 size 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 document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

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

[0116] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily 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 this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A multi-rate real-time simulation apparatus, characterized by comprising: The device comprises a large-step simulation system, a small-step simulation system, an input interface, an output interface, a counter and a synchronization module; The large-step simulation system is connected with the small-step simulation system through the input interface and the output interface respectively; The input interface is used for data integration of input data of the large-step simulation system, to generate first simulation data, and the first simulation data is transmitted to the small-step simulation system, so that the small-step simulation system performs simulation calculation on the first simulation data with a first simulation step; The output interface is used for data extraction of output data of the small-step simulation system, to generate second simulation data, and the second simulation data is transmitted to the large-step simulation system, so that the large-step simulation system performs simulation calculation on the second simulation data with a second simulation step; The second simulation step is N times of the first simulation step, and N is a positive integer; The counter is used for counting with the first simulation step as a period after the multi-rate real-time simulation device starts simulation, until the counting value is reset to 0 after the counting value is N-1; The synchronization module is used for outputting a synchronization signal between the large-step simulation system and the small-step simulation system; The synchronization signal is high level when the counting value of the counter is 0, and is low level when the counting value of the counter is not 0.

2. A method for modeling an input interface applied to an input interface of a multi-rate real-time simulation device, characterized in that, The method comprises: When receiving input data of a large-step simulation system, determining initial enable information and initial data information of the input data, and reading a counting value of a counter in a multi-rate real-time simulation device in real time, and judging whether the input data is continuous; If yes, updating the initial enable information and the initial data information according to the counting value to obtain final enable information and final data information; If no, solving the counting value based on a preset split factor, and updating the initial enable information and the initial data information according to a solving result to obtain final enable information and final data information; Integrating the final enable information and the final data information according to a bit integration method to generate first simulation data, and transmitting the first simulation data to a small-step simulation system; The solving of the counting value based on the preset split factor comprises: Dividing the counting value by the preset split factor to obtain an integer value and a remainder value in a division result; The updating of the initial enable information and the initial data information according to the solving result to obtain final enable information and final data information comprises: Judging whether the input data satisfies a condition that the integer value is 1 and the remainder value is less than a data length of the input data; If yes, adding 1 to the remainder value to obtain an extraction position, performing numerical extraction based on the extraction position from the input data, assigning an extraction result to the initial data information to obtain final data information, and assigning the initial enable information to 1 to obtain final enable information; If not, the initial enable information is assigned as 0 to obtain final enable information, and the initial data information is assigned as 0 to obtain final data information.

3. The input interface modeling method of claim 2, wherein, The initial enable information and the initial data information of the input data are determined. The input data is allocated information to generate enable information and data information. The enable information and the data information are initialized to obtain initial enable information and initial data information when the synchronization module of the multi-rate real-time simulation device outputs a low-level signal.

4. The input interface modeling method of claim 2, wherein, The initial enable information and the initial data information are updated according to the count value to obtain final enable information and final data information. When the count value is 1, the initial enable information is assigned as 1 to obtain final enable information, and the initial data information is assigned as the input data to obtain final data information. When the count value is not 1, the initial enable information is assigned as 0 to obtain final enable information, and the initial data information is assigned as 0 to obtain final data information.

5. A method for modeling an output interface, applied to an output interface of a multi-rate real-time simulation device, characterized in that, The method comprises: When the output data of the small-step simulation system is received, the enable information and the data information of the output data are extracted, and the data information is format-converted to generate conversion information; It is judged whether the output data is continuous or not; If yes, the enable information and the conversion information are integrated according to a bit integration method to generate initial simulation data; If not, the count value of a counter in the multi-rate real-time simulation device is read in real time, and initial simulation data is determined according to the count value and the enable information; The initial simulation data is format-converted to obtain second simulation data, and the second simulation data is transmitted to the large-step simulation system.

6. The output interface modeling method of claim 5, wherein, The initial simulation data is determined according to the count value and the enable information, comprising: It is judged 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 taken as initial simulation data; If not, a step delay mechanism is triggered to update the enable information and the count value, and it is returned to judge whether the output data satisfies the condition that the enable information is 1 and the count value is greater than 0 and the 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