Professional Documents
Culture Documents
Dig. Extraction For Piping SPC - TS-XST-ENG-PI-001-00 Rev 1
Dig. Extraction For Piping SPC - TS-XST-ENG-PI-001-00 Rev 1
TS-XST-ENG-PI-001
SPECIFICATION
XSIGHT
Rev. 00 Date 13/01/2020
DIGITALISATION AND EXTRACTION FROM
IMAGED P&ID
Page 1 of 20
SPECIFICATION
XSIGHT
TS-XST-ENG-PI-002
Summary of Revisions
Description of Revision xx
1st Issued
HOLD LIST
TABLE OF CONTENTS
1. PURPOSE OF DOCUMENT
1.1 OVERVIEW
2. REQUIRED REFERENCES
2.1 PROJECT SPECIFICATIONS
3. ABBREVIATIONS
4. INTRODUCTION
4.1 P&ID
4.2 PIPING MTO
5. PROPOSED METHODOLOGY
5.1 OVERVIEW
5.2 OVERALL DIGITALISATION PROCEDURE TO READ P&ID
5.2.1 Detection and Recognition 11
5.2.2 Association and Structuring Piping Components 17
5.3 OVERALL DIGITALISATION PROCEDURE TO READ PLOT PLAN
5.3.1 Overview of Plot Plan and Equipment Coordinate 19
5.3.2 Digitalisation Procedure to Identify Plot Plan 20
5.4 DIGITALISATION PROCEDURE TO GENERATE MTO
5.4.1 MTO generation for Non pickable items 21
5.4.2 Pipe amplification factor 21
5.4.3 Digitalisation MTO generation for Non pickable items 21
5.4.4 Digitalisation MTO generation for pickable items 22
5.5 GENERATING PIPING LINE LIST
5.5.1 Line List 22
https://www.sciencedirect.com/science/article/pii/S2092678216303284
1. INTRODUCTION
1.1 OVERVIEW
The objective of this document is as a guideline for extraction of piping information from the
piping and instrumentation diagram (P&ID), and to support the development of a software
with the following targets:
Automatically identifies and extracts design information from the imaged P&ID
drawings to smart or intelligent P&ID
Produce piping line list.
Identify FROM & TO from P&ID and relative coordinate in the 2D plot plant
Identify Vertical Coordinate
Produce Piping MTO (pipe length and elbow)
2. REQUIRED REFERENCES
3. ABBREVIATIONS
Abbreviations Description
EPC Engineering, Procurement and Construction
FEED Front End Engineering Design
HAZOP Hazard and Operability Study
I/O Inlet/Outlet
MTO Material Take-Off
OPC Operation Page Connection
PFD Process Flow Diagram
Abbreviations Description
P&ID Piping and Instrumentation Diagram
4. `INTRODUCTION
This document will describe P&ID is a graphical representation of the actual process plant
using various symbols that represent actual equipment.
This document will describe a method that automatically identifies and extracts design
information from the imaged P&ID drawings to intelligent P&ID such as Intergraph’s Smart
Plant P&ID (SP P&ID), Aveva’s P&ID, and AutoCAD’s Plant P&ID.
The main objective of the paper is to extract the information from the P&ID sheets
representing schematic process flow through various components , i.e. main equipment,
sub- unit equipment, piping line, piping code, pipelines, inlet & outlet and piping
intersection.
Piping and instrument components such as valves are done by other and not included in this
activity.
P&ID is classified into generic groups based on factors possibly common to several of the
items (location, use, equipment subdivision, etc.). A classification of relevant data to be
collected in accordance with this International Standard is represented in Figure 1 as below.
The piping MTO is a list of all piping items required to purchase, fabricate and construct the
design. This list will contain all piping items, pipe, fittings, flanges, gaskets, bolts, nuts,
elbows, reducers, intersections, valves, specialty items etc. Everything must be accounted
for.
This is required as the complete modelling takes time and the MTO is needed at the earliest
time to initiate quantity cost estimation.
The following input, documents are required for working out the initial (First) MTO.
5.1 OVERVIEW
Generally, a digital P&ID is used during FEED, and to overcome this issue, image P&IDs from
previous or reference projects need to be converted to the digital P&IDs. Methods to generate digital
P&ID from an image P&ID consists of the following:
A method to recognise and extract each individual object contained in the P&ID drawings should be
developed, before generating the digital P&ID from a diagram. In this document, a deep learning-
based method to recognise and extract critical information contained in P&ID drawings is proposed.
The method consists of two stages—preprocessing and recognition & detection stages. The
preprocessing stage is further divided into process steps such as diagram alignment and removal of
outer borders and title boxes.
In the recognition & detection stage, symbols, characters, lines, and tables & inlet/outlet are
recognised.
Automatic conversion through the match of attribute modelling for each component.
Image P&ID require enough training data to improve the P&ID recognition accuracy using a deep
learning model. The training data structure suitable for P&ID recognition needs to be defined in this
sense to ensure the efficiency of training data building by collecting all necessary data and
consistently extracting relevant data from all pertinent sources.
P&ID folder consists of the files containing the lists of symbol and character classes. The symbol
class includes the symbol type and orientation as well as character class, count, size, and orientation.
Generally, P&ID folder is placed under a project folder layers. The project folder, stores files
containing the list of the diagrams created in that project and actual image format diagrams, including
database library (refer to the Document: Piping Database Specification: Document No: TS-XST-ENG-
PI-002) reference patterns.
Generally, the P&ID folder, thus, stores files containing the list of the diagrams created in that project
and actual image format diagrams. In the P&ID folder layer, there are four training data folders
assorted by task area including symbol detection, character detection, line detection, table detection
and inlet/outlet detection.
Once all the entities are identified as mentioned in the above section, relations between the entities
need to be populated and stored in the database.
In addition, the digitised P&ID drawing will be obtained from the database that is saved in image P&ID
drawing or text form by modeling the symbol, line, and text in an intelligent P&ID.
Even though P&ID template can be changed in each project due to owners’ requirements, the overall
structure is similar. P&ID is generally consisted of outer boarder and inner boarder lines, a note area
at right side and a title area at lower-right side and a main area where a diagram located. Prior to
detecting a main area of P&IDs are recommended to remove boarder lines, note, and title areas for
When the diagrams are scanned in an inclined state, depending on the environment or condition,
more training data will be required to process various inclined angles of the scanned images. In the
case where the amount of training data is limited, preprocessing must be conducted to realign the
inclined the diagram, to improve the diagram recognition accuracy.
There are various types of symbols present in the P&ID drawings which represent instrumentation,
mechanical and piping equipment. These symbols have been registered in a database, Refer to
document: Piping Database Specification: Document No: TS-XST-ENG-PI-002. Subsequently, the
symbols are recognised and extracted in the P&ID drawing based on the database where the
symbols are stored.
Before proceeding to symbol recognition, the image-classification deep learning (DL) model learns
how to classify images with the symbol image training data extracted from the diagram. It detects the
types and positions (bounding box) of the symbols included in the P&ID image, by applying the sliding
window technique to the trained deep learning model. The overlapping symbol recognition results are
merged through the process of grouping.
DL method based on CNN model such as AlexNet, YOLO, R-CNN, etc can be used as object
detection algorithm in this work.
The P&ID symbol images from the project folders and document: Piping Database Specification:
Document No: TS-XST-ENG-PI-002 will be used as recognition objects and training data. During the
symbol recognition step, the recognised symbols are compared with the registered symbols. The
recognised symbols can be set to determine the symbols as a registered symbol only when the
matching degree of the recognised symbol is higher than the threshold value set by a user. Through
this method, a user can arbitrarily set the threshold value to adjust the recognition speed and rate.
This piping lines can be identified as a solid vertical and horizontal lines using methods such as
sliding window. From the recognized symbols, the line is recognized by moving the sliding window
up/down/left/right at the connecting point of the symbol. If a line is not found when a sliding window is
moved left/right, then a sliding window is moved up/down from the endpoint to find a line. All other
lines such as electrical lines, pneumatic lines and hydraulic lines which do not correspond to piping
shall be identified and excluded.
At each window position, the CNN will classify the lines a regression model and takes in an image
and predicts (x, y) coordinates.
Pixel coordinates will be used to enhance the detection of the lines such as where the line and the
symbol are connected, may not exactly match with the coordinates of the endpoint of the line because
of the line’s thickness and the symbol on the image. In this case, the lines and symbols should be
fine-tuned by such as separating by a pixel unit to the symbol’s connecting point coordinates. Pixel
coordinates approach also will be used when the lines of the centres are not connected because of
the horizontal/vertical line thickness, including the the gap at the intersections, which can be valid or
invalid intersections (see figure 10 below). Our aim is to find the valid intersections and discard invalid
intersections.
The interconnecting P&IDs address the lines connecting several units and represent in the inlet or
outlet symbol, associate to the starting or ending point of the piping lines. There is a standard symbol
representing inlet or outlet. It is a polygon having 5 vertices with 3 points on one side and two on
another side in a right-pointing or left-pointing (see Figure 5 below).
INLET
INLET
OUTLE
T
OUTLE
T
Traditional approach such as Ramer-Douglas to find the orientation of the polygon knowing the fact
that there will be 3 points on one side and two on another side in a right-pointing or left-pointing. To
further classify whether the candidate is an inlet or outlet among them, we use edge pixel by taking a
small kernel K on either side of the component image and find out which edge is crossed by a single
line.
The method to recognize a table in a P&ID (refer to Figure:6) is to identify the line combinations that
form a table based on the same starting and ending points of those lines when connected in the
vertical and horizontal directions. Then, to generate a rectangular kernel with the identified line
combinations, setting the line thickness to three times the thickness of the P&ID lines and checking
whether there are lines protruding from the generated kernel and connected to other elements in the
diagram.
Piping line numbering systems or service codes listed below shall be included in conjunction with the
line class designators on P&ID's.
A”-XX-AAAA-AXXAXA
Where:-
A – denotes a digit/number
X – denotes an alphabet
Codes Description
A” Line nominal diameter/ pipe size(inch)
XX Product Designation/ Code of conveyed fluid
AAAA Line sequential number
Piping class or Pipe Class specifies the type of the components such as a type of pipe, schedule,
material, pipe ratings, branch types, valve types and valve trim material, gasket and all the other
components specific requirements to be used for different fluids under different operating conditions
in a plant.
Pipe class is developed considering Operating Pressure, temperature, and corrosive environment.
Different material specifications are segregated in separate “Piping Class”. Pipe class is part of the
Piping specification.
Code is used to cover all the information applicable to the given pipe class. This pipe class is also
included in the line number so that engineer can easily identify the material required.
At this stage, all the necessary components of the P&ID diagrams have been detected. Next step are
these components are associated with the attributes of the nearest text including piping numbering/
codes, size, rating, etc.
The piping line numberings codes are assigned to the nearest piping based on the minimum
Euclidean distance from any corner of the bounding box of nearest to the closest point on the line. By
associating the attributes of the nearest piping line numbering code, piping material, line size,
corrosion allowance can be identified.
Drawing No.
Sheet No.
At this stage, the attribute information of each inlet and outlet symbol (polygon), the text and the
attributes corresponding to the line numbers are recognised. Using this method, the interconnecting
P&IDs which are connected from one P&ID to the other P&ID are established. Thereafter, the process
repeats continuously and links the interconnecting lines to the other interconnecting lines and
rearranges them in the order of from-to.
If the extracted symbol is a piece of equipment, then it will be linked based on the equipment name
recognised in the text.
The process/utility line may start on a piece of equipment and end on a piece of equipment, start on a
line and end on a piece of equipment, or start on a line and end on a line. In addition, the equipment
has nozzles that are dependent on it, and the P&ID drawing with a connection with other P&IDs.
These gathered information on object and its integration contained in the P&ID drawings can be
represented in form of a recursive algorithm means that it will call another symbol or line that is
connected by using connection information in which an arbitrary symbol or line is stored. Thereafter,
the process repeats continuously and links the lines connected to the lines and rearranges them in
the order of from-to.
To create a topology, each symbol is connected to a line and a line first. The connected symbols are
then rearranged according to the flow mark of the line. If the connection is broken in the process of
connecting each symbol to the lines, it is necessary to adjust the coordinates based on the center line
to secure the connectivity. According to the flow mark, the from–to order is searched and arranged for
lines or objects connecting from-to, starting from the line connected “from” or “to.”
These object and its integration object and its integration contained in the P&ID drawings can also be
represented in form of an incidence matrix and a coordinates table. The incidence matrix (the arcs are
assigned to the rows and nodes to the column) has as first row and column the list of recognized
components, which are referenced to by their type and tag identifier, e.g., vessel 031-D-0100. The
inner entries of the matrix represent the connectivity between elements (row, column).
Specific connection types are indicated by distinctive tags, for the details piping codes. For example,
vessel 031-D-0100 is connected to piping line 30”-P-2026-1CS2P03 through a piping material and
flow fluid and vice versa. In cases where the effective flow direction between elements is known, a
directional incidence matrix, so called connectivity matrix (CM- the nodes are assigned to the rows
and columns of the matrix), can be used to capture directionality information. The coordinates table,
in turn, stores the position of found objects as well as their respective dimensions.
Both incidence and connectivity matrices as well as coordinates tables can be codified as
spreadsheets (e.g., on MS Excel or C# Windows Forms).
In the process of connecting the equipment, the nozzle may be attached to the equipment due to its
small size. Thus, a nozzle that overlaps the apparatus shape is found and connected to the
equipment.
The process of connecting to another P&ID can be done by using the P&ID number appearing in the
Inlet and Outlet Symbol . If the P&ID name and the actual file name in the Inlet and Outlet Symbol
Inlet and Outlet Symbol are different, then a relationship needs to be established between them. All
P&ID information connected to another P&ID should be stored, so that the P&ID information on
another page can be obtained easily, since there may also be multiple P&IDs associated with one
P&ID
The design information of the recognition result (refer to 5.2.3) will be stored in the database. This
recognition result is generated as an intermediate file in XML format. This data will be mapped to the
predefined intelligent P&ID information based on the relationship and information of the converted
data are stored.
The data are then organised to convert symbol, line, line number, and text information to an intelligent
P&ID item. These attribute stored in the database will be mapped to the attribute of intelligent P&ID.
The association relationship includes connection information between the symbol and line connected
to the line and connection information between the text and symbol. The database can include the
process sequence of design and design information that is automatically recognised and classified in
the imaged P&ID drawing.
The symbol or line connected is called by using connection information in which an arbitrary symbol
or line is stored (refer to section 5.2.4). Then, the process is repeated continuously to combine the
line with another line.
The piping line ID is a unique ID (UID) of the model that is combined into a group and modelled. This
can be done by assigning unique ID by referring to the piping code addressed in section 5.2.4,
including considering the start and endpoints of the coordinates.
The branch line can be connected by inputting the coordinates and the connector to which the
branch line is connected as the connection information. After the branch line is generated, the
coordinates of the branch line are stored. Then after connected, we can see that one branch line
object and two connector objects are created when querying the pipe run ID.
Line point coordinate calculation such as y=mxtc can be used if there is a problem to combine the
connected lines.
In the symbol-modelling step, the symbol may not be placed on the line and may not be connected. In
this case, the position of symbol is corrected to the position of the connected primary line and
modelled upon it. The method of modelling the symbol uses the connector and coordinates.
If the coordinates of the symbol are different from the coordinates of the connected line, modelling is
impossible, and the symbol cannot be located at the correct coordinates. It is possible to solve this
problem and model the symbol by correcting the position of the symbol to the position of the
connected primary line. The attribute information of the symbol in the database is stored in
association with the symbol attribute of the intelligent P&ID. The symbol attribute information can be
executed at a later stage, after the symbol is modelled. The symbol attribute of intelligent P&ID and
the attributes stored in the database are preceded in the step of mapping and storing the database.
Symbol attributes can be extracted in the drawing of intelligent P&ID by linking the attribute
information of the symbol.
Subsequently, the line number attributes corresponding to the piping service code are connected to
the connector and modelled. During the modelling technique, if the value of the attribute information
does not match the item attribute of the intelligent P&ID, the report can be produced.
Text of the equipment will be modelled on the coordinates and equipment symbol stored in the
database.