Autocorrection of Piping and Instrumentation Diagrams using Artificial Intelligence
L. Schulze Balhorn (TU Delft - Applied Sciences)
J.R. van Ommen – Promotor (TU Delft - Applied Sciences)
A.M. Schweidtmann – Copromotor (TU Delft - Applied Sciences)
More Info
expand_more
Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.
Abstract
Piping and instrumentation diagrams (P&IDs) depict the
functional structure of chemical plants. Developing P&IDs involves multiple
engineering disciplines such as process, mechanical, electrical, and control
engineering. Naturally, P&ID drafts can contain errors and depict
suboptimal designs due to their complexity and labor-intensive nature of their
development. Undetected errors or suboptimal designs in P&IDs can cause
hazardous situations, unnecessary emissions, and inefficient operation. These
errors are currently addressed through extensive review processes leading to
safe, operable, and maintainable plants. However, large-scale engineering
projects can involve tens to thousands of P&ID pages, leading to a
significant revision workload. With the advent of digitalization and data exchange
standards such as the Data Exchange in the Process Industry (DEXPI), there are
new opportunities for algorithmic support of P&ID revision. Therefore, this
thesis explores how artificial intelligence (AI) can support the review of
P&IDs. We investigate different AI methods to assist in the review of
P&IDs and examine how plant data should be represented for generative AI
applications.
First, a Large Language Model (LLM)
could assist with answering questions arising during P&ID review. We assess
the answering capabilities of a state-of-the art LLM, ChatGPT version
15.Dec.2022 up to 09.Feb.2023, in natural sciences and engineering. Then, we
shift the focus toward method development. We propose a rule-based method for
automatically detecting and correcting, or autocorrecting, errors in P&IDs.
This includes a rule base that stores design rules from heuristics and
regulations, and an inference engine that applies these rules to DEXPI
P&IDs. Additionally, we develop autocorrection methods based on generative
artificial intelligence (GenAI). As process data are crucial for GenAI, we mine
process diagrams from scientific literature. Specifically, we extract images
from articles and classify the images with a convolutional neural network. Our
GenAI-based autocorrection method interprets autocorrection as a translation
task. We utilize an LLM to translate a potentially incorrect process diagram into
a corrected one. To this end, we represented process diagrams as SFILES
sequences and train a sequence-to-sequence model. Furthermore, we investigate
whether LLMs learn more efficiently from flowsheet sequences or flowsheet
graphs. Here, graph is the mathematical term for network. We propose the
Graph-to-SFILES model that combines a process graph input with an SFILES
sequence output. Finally, we utilize the Graph-to-SFILES model for the
autocorrection of utility P&IDs. Overall, these GenAI studies represent an
initial proof-of-concept.
The results indicate significant
potential for AI-assisted P&ID revision, but also highlight that challenges
remain for industrial application. In our study, the state-of-the-art LLM can
answer scientific questions partly correct up to mostly correct across diverse
domains. However, the LLM is lacking a critical attitude in its answers. A
promising future research direction is to use the LLM for P&ID review via
an agentic workflow. The rule-based approach can successfully correct DEXPI
P&IDs by utilizing a rule base containing engineering heuristics and regulations.
It improves on the current state-of-the-art by considering design attributes
and improving interoperability. The flowsheet mining results achieve a recognition
accuracy of 97.9% and enable the extraction of over 1500 flowsheets from a
single journal. Combined with flowsheet digitization, the classifier provides a
foundation for large-scale process data mining. Nonetheless, we rely on synthetically
generated process topologies for the remainder of our work. The sequence-to-sequence
autocorrection model successfully learns the flowsheet syntax and reaches 80.1%
accuracy on a synthetic autocorrection dataset. It serves as a proof-of-concept
of the novel task formulation for autocorrection. Our investigation of graph
vs. sequence encoding shows that graph encoding is beneficial for small-scale
datasets while sequence encoding leads to better results for large scale datasets.
On the task of autocorrection, the Graph-to-SFILES model achieves 81.5%
accuracy on a synthetic dataset of DEXPI-conform P&ID graphs. In addition, the
results indicate that the model can leverage graph attributes which encode
process details such as the fluid code. However, we could not show a successful
application of GenAI autocorrection on industrial P&IDs due to a lack of
data. The main contribution of the GenAI approaches therefore lay in the task formulation,
benchmark dataset, and interoperable pipeline.
Our conclusions are threefold. First, we conclude that
machine-readable engineering data are key for AI-assisted P&ID review.
Second, rule-based autocorrection can immediately provide benefit for
industrial practice. Third, GenAI-based autocorrection offers potential for the
future but requires further research. Further research should aim to combine
the different autocorrection methods in a hybrid approach. We anticipate that
AI-assisted P&ID review will benefit process engineering by improving
P&ID quality and by freeing up resources from repetitive, cumbersome tasks
to focus on innovation.