Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SEP-022: AI–DAE Hybrid Digital Twin Architecture

Status: Draft Priority: Strategic Created: December 2025 Audience: EQ internal (technical, proposal, patent-prep)

Summary

Trusted, self-tuning digital twins using DAEs as the physics anchor, with AI constrained to residual-driven, auditable adjustments.

1. Executive summary

We build trusted, self-tuning digital twins (where tuning proposals are generated automatically but acceptance is regulated and human-authorized) by anchoring inference and control in a physics-based DAE model, then using AI (LLMs/SLMs + tools) only where the physics model mismatches reality. This approach embodies a residual-regulated digital twin architecture where physics serves as the arbiter of trust and AI interprets disagreement rather than deciding correctness.

Core loop:

  1. Run a DAE twin (ideally acausal / multi-physics).
  2. Compute residuals between telemetry and model-predicted observables.
  3. Use AI to propose structured corrections (parameters, disturbances, topology/mode, sensor faults).
  4. Accept/reject via deterministic gates (re-simulation, constraints, bounds, residual reduction).
  5. Blend corrections via regulated trust variables (F) with inertia and auditability.

Result: mission-critical trust plus operational value for diagnosis, root cause, and predictive maintenance.

Epistemic stance: This architecture explicitly refuses to collapse uncertainty prematurely. Where data is ambiguous or operating regimes are novel, the system preserves and communicates uncertainty rather than hallucinating confidence. AI suggests hypotheses; physics and deterministic validation decide acceptance.

2. Why DAEs are the right substrate

Many real systems are DAEs, not ODEs:

  • electrical networks (Kirchhoff constraints),
  • power electronics + controls (switching + constraints),
  • robotics/mechanisms (kinematic constraints),
  • multi-physics coupling (thermal/fluid/electrochemical).

Generic form: F(x_dot, x, z, u, t) = 0
x: differential states, z: algebraic states/constraints, u: inputs.

DAEs preserve physical meaning, enforce constraints, and support mode-aware topology.

3. “Stitch AI to physics” (not “replace physics”)

AI does not declare reality. Physics does. AI operates on the residual frontier:

  • Why doesn’t the model match?
  • Which parameters drifted?
  • What disturbance is missing?
  • Which switch/topology/mode is wrong?
  • Which sensor is wrong or time-misaligned?
  • What targeted test would disambiguate?

Power systems advantage: Unlike perception-heavy domains (autonomy, vision systems), power systems expose waveform-level measurements and governing equations that remain valid across operating regimes. This enables physics-based models to establish the physics authority and trust boundary in ways that learned perception stacks cannot. Where autonomous systems must use learned watchdog models to predict failure, power systems can detect model mismatch through direct physics residuals—a structurally stronger foundation for mission-critical operation.

4. Signals in/out

Inputs: waveform telemetry + PQ features, EMS/SCADA signals, asset metadata/context, DAE model (equations/params/topology/constraints). Outputs: full state estimate (incl. unmeasured nodes), residual map (structured, not scalar), ranked hypotheses, corrected model parameters/topology, uncertainty quantification + audit trail, and constrained actions.

Residuals as structured evidence: Residuals are not merely scalar alarms indicating “good” or “bad.” They carry geometric and directional information: which equations or constraints are violated, at what frequencies, in which states, and with what patterns over time. This structure enables localization (where in topology/parameters the mismatch originates) and provides gradients for model correction. In DAE terms, residuals have interpretable structure that AI can reason about without obscuring physical meaning.

5. The “F” concept (regulated blending / regime selection)

Define trust/blending variables F_i per subsystem/constraint-group:

  • F_i = 1 → trust physics fully in that region.
  • F_i = 0 → rely heavily on residual correction in that region.

Compute F_i deterministically from:

  • residual magnitude/trend,
  • constraint satisfaction,
  • sensor consistency,
  • solver health / convergence,
  • uncertainty/covariance,
  • mode transition confidence.

Add inertia (LPF) so trust does not “flip” on noise. Large |ΔF| is a review/alert hook.

6. Preventing LLM “lies” and preserving uncertainty

LLM produces candidate changes in strict schemas:

  • parameter deltas + units + bounds,
  • topology/mode candidates,
  • disturbance terms,
  • sensor fault hypotheses,
  • proposed tests.

Deterministic layer accepts only if:

  • re-simulation improves residuals (out-of-sample, not just in-sample),
  • constraints remain satisfied,
  • changes are physically plausible and bounded,
  • system remains stable,
  • uncertainty bounds remain valid.

Maximum entropy principle: Among all model corrections that explain observed residuals, prefer those that make fewest additional assumptions about unobserved states or future conditions—for example, preferring parameter drift explanations over topology changes unless residual structure demands otherwise. This prevents overfitting explanations to current behavior and maintains generalization across novel operating regimes.

Authority separation:

  • Physics layer: Arbiter of truth, constraint enforcement, stability verification.
  • Deterministic validation layer: Acceptance gates, bounds checking, re-simulation.
  • AI layer: Hypothesis generation, ranking, contextual interpretation.
  • Human layer: Authority on model updates, especially for ambiguous causality (Was model incomplete? Undocumented field changes? Cyber/physical adversary? Sensor fault vs. real phenomenon?).

Human-in-the-loop as epistemic correctness: For mission-critical systems, retaining human authority over model updates is not a limitation but an epistemic necessity. Subject matter experts are best positioned to distinguish between competing explanations (unmodeled physics, documentation errors, adversarial behavior, sensor degradation) that may produce similar residual patterns. AI surfaces evidence and hypotheses; humans decide model truth.

7. Unmeasured nodes and failure anticipation

DAE + estimator infers unmeasured states with uncertainty. Ambiguity rises with missing sensors, unknown switching, wrong topology, or missing disturbances. These manifest as persistent residuals, high covariance, or solver instability and are exactly where AI-assisted hypothesis generation helps.

Introspection layers:

  • System-level introspection: Monitoring overall health, detecting when the combined DAE+estimator system should reduce its authority or trigger alerts. Implemented via F variables and deterministic health metrics.
  • Model-level introspection: The DAE model itself “knows” where it disagrees with reality through structured residuals, enabling targeted correction rather than wholesale model replacement. This is deeper than learned watchdog supervision—it’s self-modeling through physics-grounded mismatch analysis.

Failure as first-class concern: Rather than treating model failure as an emergent property of low confidence scores, this architecture explicitly models and tracks failure modes: parameter drift, topology errors, sensor faults, unmodeled disturbances. Failure prediction and diagnosis are primary outputs, not side effects.

Identifiability limits: In cases where residuals are explainable by multiple physically admissible hypotheses (structural non-identifiability), the system preserves multiple competing hypotheses rather than forcing convergence to a single explanation. The system communicates ambiguity explicitly, ranks hypotheses by likelihood and physical plausibility, and may propose discriminating tests or additional sensor placement to resolve uncertainty. This epistemic honesty is essential for mission-critical applications where forcing premature convergence can mask root causes or enable adversarial exploitation.

8. Minimal prototype plan

  1. Pick bounded pilot system (BESS block, feeder segment, UPS+generator, etc.).
  2. Build DAE model + estimator (EKF/UKF/MHE as needed).
  3. Residual localization (Jacobian/sensitivity mapping to equation groups/states).
  4. Deterministic F_i computation.
  5. LLM tool loop for structured correction proposals.
  6. Deterministic accept/reject with audit logs.
  7. Demo on replay data, then in real-time.

9. Technology candidates

Julia + ModelingToolkit.jl / Dyad

The acausal DAE modeling requirements in this architecture (Section 2) align well with the Julia SciML ecosystem:

  • ModelingToolkit.jl — Open-source symbolic-numeric modeling framework. Supports acausal (equation-based) component models, automatic index reduction for high-index DAEs, symbolic Jacobian generation, and code generation. The symbolic layer directly enables the residual localization step (Section 8, step 3) by providing analytical sensitivity/Jacobian mappings from residuals to parameters and states.

  • Dyad — JuliaHub’s commercial acausal modeling environment built on ModelingToolkit.jl. Provides a graphical component-based modeling interface, pre-built component libraries (electrical, thermal, mechanical, control), and enterprise tooling. Relevant for rapid prototyping of multi-physics DAE models (power electronics, thermal coupling, control loops).

  • DifferentialEquations.jl — High-performance DAE solvers (IDA, Rodas, DFBDF, etc.) with automatic stiffness detection, event handling for mode/topology switching, and adjoint sensitivity analysis.

Advantages for EQ’s architecture:

  • Native support for DAEs of arbitrary index, not just ODEs.
  • Symbolic Jacobians enable efficient residual localization (mapping residuals to specific equations, parameters, and states).
  • Event handling and callbacks support topology/mode switching (breaker operations, control mode changes).
  • Code generation to C/LLVM for edge deployment performance.
  • Julia’s type system and multiple dispatch enable clean separation of model structure from solver/estimator logic.
  • Active ecosystem for state estimation (Kalman filtering, MHE) and uncertainty quantification.

Integration considerations:

  • Julia runtime adds deployment complexity compared to the pure Rust/Python stack.
  • Evaluate embedding options: Julia process managed by Rust supervisor, or compiled model artifacts consumed by Rust.
  • Consider ModelingToolkit’s FMI export for interoperability with other tools and the existing stack.
  • Prototype phase can use Julia directly; production deployment may use generated code or FMU export.

Other candidates (for reference)

  • Modelica / OpenModelica — Mature acausal DAE ecosystem with FMI standard, but less flexible for custom AI integration loops.
  • CasADi (Python/C++) — Symbolic DAE framework focused on optimal control; strong for MHE/MPC but less natural for component-based modeling.
  • Custom Rust DAE solver — Maximum deployment simplicity but significant development effort for acausal modeling capabilities.

10. EQ-specific leverage and broader applicability

EQ wins here because we have:

  • waveform-level telemetry (not just RMS/SCADA),
  • bounded domains where explicit routes/tools are feasible,
  • edge-first deployment and on-prem constraints,
  • rigorous engineering and safety posture.

Domain applicability: While grounded in power and energy systems, this architecture is broadly applicable to cyber-physical systems requiring trustworthy integration of physical models, real-time data, and AI-assisted analysis:

  • Shipboard and shore-based power systems
  • Platform health monitoring (naval vessels, aircraft, autonomous systems)
  • Battery management and energy storage
  • Robotics with kinematic/dynamic constraints
  • Multi-physics manufacturing processes
  • Any mission-critical system where physical grounding, interpretability, and resource awareness are essential

The architecture is domain-agnostic at the structural level, requiring only domain-specific DAE models and analytical tools while maintaining the same core framework of physics authority, residual-driven AI, and deterministic validation.

11. IP / proposal framing

Use: “Trusted, interpretable digital twins for mission-critical infrastructure.”
Emphasize: on-prem operation, auditable logs, constraint-bounded AI, residual-localized corrections, and regulated trust/blending (F) computed deterministically.

12. Connection to Cyber-Physical AI (CPAI) architecture

This DAE-hybrid approach forms the core of EQ’s broader Cyber-Physical AI architecture. The semantic routing and orchestration layer (multimodal RAG + tool-based routing) coordinates multi-mode DAE execution:

  • Real-time execution: Aligned with live system state for monitoring and control
  • Retrospective execution: Forensic analysis and root cause investigation
  • Predictive execution: Forward simulation for forecasting and early warning
  • Scenario-based execution: What-if analysis and sensitivity exploration

The same physics-authority / AI-interpretation boundary applies across all execution modes. The orchestration layer manages parallel model execution, hypothesis testing, and resource allocation while enforcing the same trustworthiness constraints described here. Edge deployment enables low-latency analysis with centrally prescribed algorithms and event-driven reporting.

13. Capability–Authority matrix

This architecture explicitly separates capabilities (what the system can do) from authority (what decides truth):

CapabilityEnabling MechanismAuthority Model
State estimationDAE + estimator (EKF/UKF/MHE)Physics equations are authoritative
Anomaly detectionResidual monitoring, F-variable computationDeterministic thresholds and physics constraints
DiagnosisAI-assisted hypothesis generation from structured residualsPhysics + deterministic validation gates
Model correctionAI-proposed parameter/topology updatesHuman approval for acceptance
PredictionMulti-mode DAE executionPhysics governs forward dynamics
Control recommendationsConstrained optimization over validated modelPhysics + safety constraints + human authority

14. One-paragraph explanation for a technical investor/partner

We keep a DAE physics model as the source of truth and only let AI operate on the mismatch between model and telemetry. Residuals localize exactly where physics fails and provide structured evidence about what’s wrong. AI proposes targeted parameter/topology/disturbance changes, but a deterministic safety layer validates them with constraints and re-simulation before acceptance. Human experts retain authority over model updates, especially where causality is ambiguous (unmodeled physics vs. documentation errors vs. adversarial behavior). This architecture preserves interpretability, prevents AI from hallucinating certainty, and maintains mission-critical trust while enabling continuous learning and adaptation.

End of report.



© 2026 EQ Systems Inc.