Table of Contents
Fetching ...

Rule-based autocorrection of Piping and Instrumentation Diagrams (P&IDs) on graphs

Lukas Schulze Balhorn, Niels Seijsener, Kevin Dao, Minji Kim, Dominik P. Goldstein, Ge H. M. Driessen, Artur M. Schweidtmann

TL;DR

This work tackles repetitive, error-prone revision of P&IDs by proposing a deterministic, rule-based autocorrection framework built on graph representations of P&IDs aligned to the DEXPI standard. It converts DEXPI P&IDs to graphs using a pyDEXPI implementation, then applies 33 engineering-rule graphs to detect and correct missing or erroneous substructures via subgraph isomorphism with conditional constraints. In a case study using a representative DEXPI P&ID, the method achieved 100% accuracy on five exemplar rules and delivered corrections in milliseconds, highlighting potential for real-time engineering support. The study discusses tradeoffs with scalability and explainability, and suggests hybrid approaches combining rule-based and ML techniques to scale while preserving determinism and safety.

Abstract

A piping and instrumentation diagram (P&ID) is a central reference document in chemical process engineering. Currently, chemical engineers manually review P&IDs through visual inspection to find and rectify errors. However, engineering projects can involve hundreds to thousands of P&ID pages, creating a significant revision workload. This study proposes a rule-based method to support engineers with error detection and correction in P&IDs. The method is based on a graph representation of P&IDs, enabling automated error detection and correction, i.e., autocorrection, through rule graphs. We use our pyDEXPI Python package to generate P&ID graphs from DEXPI-standard P&IDs. In this study, we developed 33 rules based on chemical engineering knowledge and heuristics, with five selected rules demonstrated as examples. A case study on an illustrative P&ID validates the reliability and effectiveness of the rule-based autocorrection method in revising P&IDs.

Rule-based autocorrection of Piping and Instrumentation Diagrams (P&IDs) on graphs

TL;DR

This work tackles repetitive, error-prone revision of P&IDs by proposing a deterministic, rule-based autocorrection framework built on graph representations of P&IDs aligned to the DEXPI standard. It converts DEXPI P&IDs to graphs using a pyDEXPI implementation, then applies 33 engineering-rule graphs to detect and correct missing or erroneous substructures via subgraph isomorphism with conditional constraints. In a case study using a representative DEXPI P&ID, the method achieved 100% accuracy on five exemplar rules and delivered corrections in milliseconds, highlighting potential for real-time engineering support. The study discusses tradeoffs with scalability and explainability, and suggests hybrid approaches combining rule-based and ML techniques to scale while preserving determinism and safety.

Abstract

A piping and instrumentation diagram (P&ID) is a central reference document in chemical process engineering. Currently, chemical engineers manually review P&IDs through visual inspection to find and rectify errors. However, engineering projects can involve hundreds to thousands of P&ID pages, creating a significant revision workload. This study proposes a rule-based method to support engineers with error detection and correction in P&IDs. The method is based on a graph representation of P&IDs, enabling automated error detection and correction, i.e., autocorrection, through rule graphs. We use our pyDEXPI Python package to generate P&ID graphs from DEXPI-standard P&IDs. In this study, we developed 33 rules based on chemical engineering knowledge and heuristics, with five selected rules demonstrated as examples. A case study on an illustrative P&ID validates the reliability and effectiveness of the rule-based autocorrection method in revising P&IDs.

Paper Structure

This paper contains 10 sections, 3 figures, 1 table.

Figures (3)

  • Figure 1: Rule-based autocorrection on graphs. We first translate a machine-readable smart P&ID to a P&ID graph. Then, we apply the engineering rules in the form of graph manipulations to the P&ID graph. In future applications, the autocorrection method may be implemented in a P&ID assistant with the human-in-the-loop. Changes can then automatically be updated in the DEXPI P&ID. We envision applying the rule-based autocorrection also on P&IDs in image format via digitization. Steps indicated by solid lines are implemented, steps indicated by dashed lines are envisioned for future projects.
  • Figure 2: Graph rule for a pump installation: Install a check valve in the pump's discharge line. This rule describes a missing component. According to P&ID markups, we denote added edges or nodes in red and deletions in blue. Note that the nodes contain all attributes of the respective DEXPI classes.
  • Figure 3: Case study for the rule-based autocorrection using the DEXPI v1.3 reference P&ID C01 (https://gitlab.com/dexpi/TrainingTestCases). Note that the P&ID does not reassemble an actual process but acts as a demonstration of the DEXPI data model. The autocorrection method updates pump P4711, pump P4712, and vessel T4750. The same corrections shown for pump P4711 are also applied to pump P4712.