Compiler IR for Accelerated DAE Simulation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current compiler systems for simulating differential algebraic equations (DAEs) face scalability limitations, particularly in handling large and complex models, as they often require transformation to improve numerical stability and compatibility with equation solvers, which existing general-purpose simulators and specific domain simulators struggle to achieve.
Innovation Solution
The implementation of a general-purpose compiler system that uses a set of intrinsics to represent DAEs, performing structural analysis and automatic differentiation, and transforming the model functions to enhance scalability, allowing for efficient execution with numerical solvers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If model functions are transformed to improve numerical stability and solver compatibility, then simulation reliability improves, but device complexity and transformation difficulty increase
Solution Approach 1:
The patent introduces an intermediate representation (IR) as a mediator between the source modeling language and the numerical solver. The compiler transforms model functions into this intermediate form, which then undergoes systematic transformations (index reduction, state selection, automatic differentiation) before being passed to the solver. This intermediary layer isolates the complexity of transformations from both the user's model definition and the solver's requirements, improving reliability while managing complexity through structured compilation stages.
Solution Approach 2:
The patent applies parameter changes through automatic differentiation, which systematically transforms the model functions by computing derivatives with respect to state variables. This changes the mathematical parameters of the model from algebraic relationships to differential relationships, improving numerical stability for time-series simulation while the compiler automates the complex transformation process to manage the resulting complexity.
2Adaptability or versatility
If general-purpose compilers are used to simulate DAEs, then adaptability and versatility improve, but scalability to large complex models deteriorates
Solution Approach 1:
The patent segments the compilation process into distinct, modular passes: structural analysis to build incidence matrices, index reduction to simplify DAE index, state selection to identify differential states, and automatic differentiation to compute derivatives. Each pass operates independently on specific aspects of the model, allowing the compiler to handle large complex models efficiently by processing them in manageable segments rather than as monolithic transformations.
Solution Approach 2:
The patent creates a universal intermediate representation that can represent multiple source modeling languages (Modelica, SPICE, Verilog-A) and multiple solver requirements through a single compilation framework. This universal IR serves multiple functions: it preserves structural information for analysis, supports automatic differentiation for time-series simulation, and can be transformed into various solver-specific formats, thereby improving scalability while maintaining versatility.
3Manufacturing precision
If structural analysis and automatic differentiation are performed at intermediate representation level, then manufacturing precision of transformation improves, but computation time increases
Solution Approach 1:
The patent performs structural analysis and builds the hierarchical incidence matrix during the compilation phase before simulation execution. This preliminary action pre-computes the structural relationships and differentiation requirements, storing them in the intermediate representation. During actual simulation, these pre-computed structures are reused, achieving high transformation precision without repeating the expensive structural analysis, thereby reducing the time loss during production use.
Data Source
AI summary
Compiler systems and methods that solve the DAE transformation problem by simulating DAEs using general-purpose compilers are disclosed herein. The compiler systems and methods extend an existing general-purpose intermediate representation (IR) with a minimal set of intrinsics to represent the model function, which allows leveraging existing compiler technology. A first compiler input is a model of a physical system from source modeling languages. A second compiler input is a first IR for each subroutine specific to the model. The model is compiled to a second IR that is universal across multiple source modeling languages. The IR maps each primitive of the source modeling language to a subroutine call specific to the source modeling language from which the primitive is derived. The first and second IRs are combined into a third IR that describes the model in terms of intrinsics of the third IR.


