Simulation of Hybrid Circuits in Constraint Logic Programming

Thomas Graf, Pascal Van Hentenryck, Claudine Pradelles, Laurent Zimmer

Abstract

LOGISIM is a specialized CAD tool developed using the CHIP constraint logic programming language to simulate complex hybrid circuits. By integrating high-level qualitative states with low-level quantitative physical constraints, LOGISIM enables efficient simulation of systems combining electrical, mechanical, and hydraulic components, such as aerospace landing gear. This approach avoids the "data swamp" of purely quantitative simulators and the "state explosion" of purely qualitative reasoners.

Introduction

The design and maintenance of "hybrid" circuits—systems integrating electro-mechanical relays, hydraulic actuators, and digital control logic—present significant challenges for engineers. Traditional simulation methodologies typically fall into two categories: quantitative simulators (like SPICE), which provide detailed physical data but obscure functional behavior, and qualitative reasoners, which model abstract states but often lack the numerical rigor to prevent physically impossible results.

LOGISIM addresses this gap by leveraging Constraint Logic Programming (CLP) to maintain physical accuracy while presenting results that reflect the functional behavior of the system. It allows for the detection of high-level states such as "component blown" or "relay stuck" while remaining grounded in physical laws.

Methodology: Constraint-Based Hybrid Modeling

The core of LOGISIM is its implementation in CHIP. This framework allows simulation to be treated as a constraint satisfaction problem. Devices are modeled through two distinct components:

  1. Static Part: Encapsulates fundamental physical laws, such as Ohm’s Law or Kirchhoff’s Laws, represented as linear constraints over rational numbers.
  2. Dynamic Part: Defines state transitions and functional behavior.

A key innovation in LOGISIM is the use of quantitative values to prune the qualitative search space. For instance, numerical current thresholds are used to determine if a component is "on," "off," or "blown."

CHIP implementation of a light bulb model, demonstrating the integration of numerical constraints and qualitative states.

To optimize performance, the authors distinguish between "Stable" models (S-models), where internal transitions do not alter circuit topology, and "General" models (G-models), which do. By refining G-models into sequences of S-models through the addition of intermediary transition states, the system transforms a complex backtracking search into a more efficient sequential scheduling task.

Key Insights

  • Topology-Driven Search: The search space is primarily defined by the circuit's topology rather than the total number of possible states. If the topology is fixed, physical values can be computed deterministically.
  • Artificial States for Efficiency: Counter-intuitively, adding intermediary states to capture the exact moment of a topology change eliminates the need for the solver to "guess" and backtrack, significantly speeding up the simulation.

Results and Evaluation

LOGISIM was evaluated on industrial benchmarks from the ELSA project, including a fighter aircraft landing gear system with 57 components and 112 connections. The tool demonstrated linear scaling, where the time per simulation step remains constant for a given circuit and scales linearly with the number of components.

On a SUN-3 workstation, the complex landing gear system was simulated at approximately 1.3 seconds per step. Beyond speed, LOGISIM successfully identifies design anomalies such as oscillations, component blowouts, and timing-dependent ambiguities.

Simulation trace showing the state transitions of circuit components over 15 time steps.

Conclusion

LOGISIM demonstrates the power of Constraint Logic Programming in bridging the gap between qualitative and quantitative system modeling. While the initial modeling of complex devices requires significant domain expertise, the resulting tool provides a high-performance, functionally clear simulation environment. Future work aims to extend these constraint-based models to automated diagnostics and test generation within the broader ELSA project framework.

Summary updated

BibTeX
@inproceedings{graf1989simulation,
  author = {Thomas Graf and Pascal Van Hentenryck and Claudine Pradelles and Laurent Zimmer},
  title = {{Simulation of Hybrid Circuits in Constraint Logic Programming}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1989},
}
Figure