Automatic generation of P&IDs with artificial intelligence
We use generative AI to create Piping and Instrumentation Diagrams (P&IDs) from process flow diagrams (PFDs). The models predict control structures and other P&ID details in the same way that language models translate text.
Challenge
Developing P&IDs is a crucial and labor-intensive step in process development. Engineers add instrumentation, control loops, valves, and safety equipment to a process flow diagram, largely based on experience, company standards, and previous designs. This knowledge is rarely available in a form that software can use.
Our approach
Our method is inspired by end-to-end transformer-based language translation models. We cast control structure prediction as a translation task in which PFDs are translated into P&IDs. To use established transformer-based models, we represent PFDs and P&IDs as strings using the SFILES 2.0 notation. The model is pre-trained on generated P&IDs to learn the grammatical structure of process diagrams and then fine-tuned on real P&IDs by transfer learning. The model achieved a top-5 accuracy of 74.8% on 10,000 generated P&IDs and 89.2% on 100,000 generated P&IDs. Tests on a dataset of 312 real P&IDs showed that industrial applications need larger P&ID datasets.
Follow-up work predicts control structures directly from process topologies represented as graphs (Graph-to-SFILES).
Partners & funding
- Collaboration with Linde and Siemens on the P&ID Co-Pilot, a generative AI tool that translates PFDs into P&IDs (announcement, March 2024).
- Digitized P&IDs from the Digitization Companion (DigiCo) provide the machine-readable data such models need.
Key publications
- Schulze Balhorn, L., Degens, K., & Schweidtmann, A. M. (2025). Graph-to-SFILES: Control structure prediction from process topologies using generative artificial intelligence. Computers & Chemical Engineering, 199, 109121. doi:10.1016/j.compchemeng.2025.109121
- Hirtreiter, E., Schulze Balhorn, L., & Schweidtmann, A. M. (2024). Toward automatic generation of control structures for process flow diagrams with large language models. AIChE Journal, 70(1), e18259. doi:10.1002/aic.18259 · Details
- Vogel, G., Hirtreiter, E., Schulze Balhorn, L., & Schweidtmann, A. M. (2023). SFILES 2.0: An extended text-based flowsheet representation. Optimization and Engineering, 24, 2911–2933. doi:10.1007/s11081-023-09798-9 · Details