Simulation Compiler Code Generation for Real-Time HIL
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing simulation models struggle to execute in real-time on hardware-in-the-loop (HIL) simulations due to computational overhead, leading to potential overruns and suboptimal performance, especially when dealing with complex physical component models.
Innovation Solution
A system and method that transforms an acausal simulation model into a causal form suitable for real-time execution by using a simulation model compiler that includes an equation generator, partitioning engine, discretizer, and optimizer, which generates machine instructions for efficient execution on target hardware.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If acausal physical component models are used for simulation, then modeling flexibility and ease of use are improved, but computational overhead increases leading to real-time execution failures
Solution Approach 1:
The patent segments the acausal model execution into distinct phases: symbolic manipulation phase for model compilation and numerical evaluation phase for real-time simulation. By separating these phases, the computationally intensive symbolic manipulation is performed offline to generate optimized code, while the online phase only requires lightweight numerical evaluation, enabling real-time execution while maintaining modeling flexibility.
Solution Approach 2:
The patent performs preliminary symbolic manipulation and code generation during the model compilation phase before real-time simulation begins. This preliminary action pre-computes the execution plan and generates optimized machine code, so that during real-time execution, only straightforward numerical evaluation is needed, eliminating the computational overhead during critical real-time operation.
2Reliability
If complex physical component models are executed on target hardware, then model fidelity is improved, but computational overhead causes overruns and performance degradation
Solution Approach 1:
The patent creates an optimized copy of the acausal model in the form of machine code during the compilation phase. This generated code replicates the model's computational logic but in a highly optimized form tailored to the target hardware architecture, allowing faithful reproduction of model behavior with minimal computational overhead during real-time execution on hardware-in-the-loop systems.
3Productivity
If acausal models are transformed to causal form for real-time execution, then real-time performance is improved, but model complexity and transformation overhead increase
Solution Approach 1:
The patent introduces an intermediary code generation step that translates acausal model definitions into optimized causal execution code. This intermediary process acts as a mediator between the high-level acausal model specification and the low-level real-time execution requirements, automatically handling the complex transformation logic through symbolic manipulation and code synthesis rather than requiring manual model restructuring.
Data Source
AI summary
A solver may generate a system of equations for an acausal model. A partitioning engine may transform at least some of the equations into groups of equations whose inputs/outputs are connected directly. The partitioning engine may transform at least some of the equations into groups of linear equations and/or groups of switched linear equations that are connected through nonlinear functions. The solver may determine input-output relationships of the groups of equations. A simulation model generator that may include a library of types of model elements may construct a causal simulation model.


