Compiler IR for Accelerated DAE Simulation

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvesimulation reliabilityVSAvoidtransformation complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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.

Inventive Principle:
Principle #35Parameter changes

2Adaptability or versatility

If general-purpose compilers are used to simulate DAEs, then adaptability and versatility improve, but scalability to large complex models deteriorates

Engineering Contradiction:
Improvecompiler versatilityVSAvoidsimulation scalability
Core Design Contradiction:
Adaptability or versatilityVSProductivity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Manufacturing precision

If structural analysis and automatic differentiation are performed at intermediate representation level, then manufacturing precision of transformation improves, but computation time increases

Engineering Contradiction:
Improvetransformation precisionVSAvoidcompilation time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

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.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250013443A1Compiler systems and methods for accelerated differential algebraic equations (DAE) simulation
Publication Date: 2025.01.09 JULIAHUB INC
  • US20250013443A1 patent drawing
  • US20250013443A1 patent drawing
  • US20250013443A1 patent drawing

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.