Introduction
In the design of Cyber-Physical Systems (CPS)—such as autonomous vehicles or smart grids—engineers must simulate the intricate dance between continuous physical processes and discrete software logic. The industry-standard for this task is the Functional Mock-up Interface (FMI), which enables "co-simulation" by allowing specialized tools to exchange data. However, a fundamental flaw exists in how FMI handles time: its reliance on floating-point numbers leads to precision errors that can destabilize or break hybrid simulations.
The Precision Problem in FMI
FMI 2.0 represents time as a 64-bit floating-point number (double). While intuitive for continuous physics, this is problematic for discrete logic. Floating-point math is non-associative; for a simulation master coordinating multiple components, $(t_1 + t_2) + t_3$ may not equal $t_1 + (t_2 + t_3)$. These minute rounding errors, or "jitter," can cause events that should be simultaneous to appear nanoseconds apart. This leads to non-deterministic behavior, causality violations, or infinite loops known as Zeno behavior.
FMI-HC: A Discrete Solution
To address these issues, the authors propose FMI-HC (Hybrid Co-simulation), an extension to the standard that replaces the Newtonian ideal of real-valued time with a mathematically certain integer-based model. Key innovations include:
- Integer Time Representation: Using 64-bit unsigned integers for time eliminates rounding errors and makes simultaneity absolute.
- Superdense Time: Adopting a $(t, n)$ model, where $t$ is integer time and $n$ is a "microstep" index. This allows a sequence of discrete events to occur at the same physical time point.
- Resolution Negotiation: A protocol where the Master Algorithm negotiates a global time resolution (e.g., $10^{-9}$ seconds) that satisfies the precision requirements of all participating components (FMUs).
- Absent Signals: New API functions allow components to explicitly communicate when a signal is "absent" at a specific microstep, which is essential for reactive discrete-event logic.
Experimental Validation
The framework was evaluated using synthetic benchmarks designed to trigger failure modes in standard FMI. The primary test case was a zero-delay feedback model, which couples an integrator with a zero-crossing detector and a discrete delay.
Results and Determinism
The FMI-HC approach successfully eliminated the quantization errors that typically cause floating-point simulators to produce inconsistent results in feedback loops. The simulation demonstrated perfect determinism, ensuring that results remain identical regardless of the underlying hardware's floating-point quirks.
Furthermore, the authors demonstrated that legacy FMUs can be integrated into this new environment using modular wrappers. While these legacy components still face internal floating-point limitations, the wrapper approach prevents their precision errors from propagating across the entire co-simulation interface.
Conclusion
FMI-HC provides a robust path forward for the simulation of complex hybrid systems. By moving from floating-point to integer-based superdense time, the framework ensures mathematical certainty at the interface level. Future work will focus on standardizing these API extensions and improving the handling of state "rollbacks" within the integer-time framework.
Summary updated