Unpack Trigger for HIL Simulation Data Consistency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional Hardware-in-the-Loop (HIL) simulation systems face desynchronization issues due to limited processing resources, leading to stale data values when index variables are changed during real-time simulations, as messages may not be entirely unpacked in time, causing inconsistencies in signal value updates.
Innovation Solution
The implementation of an unpack trigger variable within the TRC interface allows for manual or automated re-unpacking of messages when index variables change, ensuring signal values remain up-to-date by triggering the latest message update, thereby avoiding stale data issues.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the real-time simulation runs as efficiently as possible with limited processing resources, then processing speed and real-time performance are improved, but message unpacking completeness deteriorates, leading to desynchronization and stale data values
Solution Approach 1:
The system performs preliminary unpacking of messages during the real-time simulation to prepare data for potential future access. By unpacking messages in advance and storing them in a buffer, the system ensures that when an index variable changes, the corresponding signal value is already available and up-to-date, eliminating the need for time-consuming unpacking operations at the moment of access and thus preventing stale data issues
Solution Approach 2:
The system dynamically adjusts the unpacking behavior based on the state of the unpack trigger variable. When the unpack trigger is activated (indicating an index variable change), the system re-unpacks the latest message to ensure data freshness. This dynamic approach allows the system to balance between processing efficiency and data consistency by only performing additional unpacking operations when necessary
2Measurement precision
If messages are fully unpacked in real-time, then data up-to-date status is improved, but processing time and resource consumption increase, violating latency requirements
Solution Approach 1:
Messages are unpacked in advance during normal simulation operation and stored in a buffer, so that when signal values need to be accessed, they are already prepared and available immediately. This preliminary action eliminates the need for time-consuming unpacking operations at the moment of data access, thus maintaining both high signal value accuracy and low processing time
Solution Approach 2:
Instead of fully unpacking all messages continuously (which would be excessive and time-consuming), the system unpacks messages partially or selectively based on the activation of the unpack trigger. When the trigger is not activated, the system relies on previously unpacked data. When the trigger is activated, the system performs an additional unpacking operation to ensure freshness. This partial action approach maintains signal value accuracy while minimizing processing time
Data Source
AI summary
A system for real-time simulation includes: a real-time computing device configured to execute the real-time simulation; and a host computing device in communication with the real-time computing device. The host computing device is configured to: configure a real-time simulation application for executing the real-time simulation; and send the real-time simulation application to the real-time computing device. The real-time computing device is further configured to, as part of executing the real-time simulation: receive a message corresponding to a data array to a buffer of the real-time computing device; unpack the message in the buffer; determine that an unpack trigger corresponding to the data array has been activated; and in response to determining that the unpack trigger corresponding to the data array has been activated, re-unpack the message in the buffer.


