Professional Documents
Culture Documents
net/publication/341895722
CITATIONS READS
2 1,101
4 authors:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Carlos Renato Vazquez on 04 June 2020.
Abstract—This work presents a novel methodology to trans- uses the P&ID, and the corresponding process and operation
late an industrial process description from the standard ISA narratives as input information to build Petri net models of
5.1 (Piping and Instrumentation Diagrams (P&ID’s)), and the the process and the desired behavior. Based on these models,
corresponding process and operation narratives, into Interpreted
Petri Nets (IPN), capturing both the plant and the specification a supervisor controller ( [11]–[14]) can be formally designed
behaviors. In contrast to other methodologies, the one herein and implemented, avoiding errors introduced in heuristic ap-
proposed can be automatized demanding from operators and proaches. The advantage of Petri nets lies in the compactness
practitioners neither knowledge on Petri nets, nor ladder dia- of the derived model and that different classes of controllers
grams. Moreover, it is endowed with error detection stages to can be designed (for instance, tracking control [15], [16]).
automatically remove errors introduced in the narratives, such
as omissions, inconsistencies, or ambiguities. The methodology Even if different works in the literature have proposed Petri
consists in capturing the process information (P&ID and narra- net models for industrial systems, to the best of our knowledge
tives) in tables, and then translating them into interpreted Petri none of those modelling methodologies is based on the ISA
nets representing both, the plant and specification behaviors. S5.1 standard, hence the engineers should start from scratch
I. I NTRODUCTION the process description and modeling, requiring to learn new
formal tools and abandoning the well established standards.
Industrial processes consist of a sequence of unit operations,
The approach of the proposed methodology follows a mod-
that could be physical (grinding, mixture, heat exchange,
ular strategy, where the industrial process information given by
drying, etc.), chemical (refining, chemical peeling), and/or bio-
a P&ID, a process narrative (P N ), and an operation narrative
chemical (fermentation, sterilization, pasteurization) [1]. These
(ON ) is presented in a structured way (tables), representing
processes are commonly represented using the standard ISA
the behavior and desired operation of the process elements.
S5.1, mainly the Pipe & Instrumentation Diagrams (P&ID) to
Next, the information captured in these tables is translated
graphically describe the interaction between actuators, sensors,
in a process graph (PG ) that represents the interaction be-
devices and process variables. Although this is a convenient
tween actuators and controlled variables. Finally, the tables
unambiguous mechanism for engineering communication, it is
information and the process graph are used to build two
incomplete since it captures neither the process functionality
IPN models, one representing the possible process behavior
nor the desired closed-loop behavior. Moreover, P&ID lack
and the other representing the required process behavior. In
of a mathematical formalism that could be used for analysis
each stage, errors such as inconsistencies, ambiguities, and
purposes. In practice, the system functionality and desired
incompleteness are detected and removed, leading to error-
closed-loop behavior are frequently captured in process and
free models.
operation narratives, which are described in natural language,
This paper is organized as follows: Section II provides basic
introducing a source of potential errors [2], [3]. As a result
definitions of PN and the fundamentals of industrial processes.
of this modelling approach, the success of the control pro-
In Section III, the proposed methodology is presented in order
gramming depends on the expertise of the programmer, who
to translate the industrial process description from a P&ID to
frequently performs a trial-and-error methodology, introducing
IPN models. Section IV describes how to detect some errors
unconscious errors and requiring expensive and time consum-
in the translation methodology. Finally, some conclusions are
ing debugging stages.
presented in Section V.
In order to cope with these problems, many researchers have
proposed formal tools and methodologies to model and ana-
II. BASIC CONCEPTS
lyze these processes, either based on Finite Automata or Petri
nets [4]. For example, [5]–[10] introduce fine methodologies This section recalls fundamentals on Petri nets and industrial
to model and analyze processes, unfortunately, all of them processes.
demand a deep knowledge on the formal tool, limiting their
applicability in real industries. The approach herein proposed A. Petri nets
1 D. Rozo-Ibañez, J. Ruiz-León and D. Guevara-Lozano are Definition 1. A Petri net (PN) structure is a bipartite di-
with CINVESTAV-IPN Unidad Guadalajara, Av. del Bosque graph represented by the 4-tuple G = hP, T, I, Oi, where P =
1145, CP 45019, Zapopan, Jalisco, Mexico {darozo, {p1 , p2 , ..., pn } is a finite set of places, T = {t1 ,t2 , ...,to } is
jruiz,dguevara}@gdl.cinvestav.mx
2 C.R. Vázquez is with Tecnologico de Monterrey, Av. Ramón Corona 2514, a finite set of transitions, I : P × T → Z≥0 is a function rep-
CP 45201, Zapopan, Jalisco, Mexico cr.vazquez@tec.mx resenting the weighted arcs connecting places to transitions,
and O : P × T → Z≥0 is a function representing the weighted In a similar way, the actuator state is the condition of the
arcs connecting transitions to places. actuator and the actuator range is the set of possible states
of the actuator. Both the controlled variables and the actuators
Pictorially, places are represented by circles, transitions by
are referred as the process elements. The elements controlling,
rectangles, and arcs by arrows. The incidence matrix of a PN
acting or sensing a controlled variable form a control loop in
is a |P| × |T | matrix C defined such that C[i, j] = O(pi ,t j ) −
the P&ID; control loops are gathered to form sub-processes.
I(pi ,t j ). The symbol •t j (resp. • pi ) denotes the set of all places
In this work, we consider processes in which the actuators
pi ( resp. transitions t j ) such that I(pi ,t j ) 6= 0 (resp. O(pi ,t j ) 6=
range and the variables range are discrete.
0). Similarly, t •j (resp. p•i ) denotes the set of all places pi (resp.
The Process Narrative (P N ) is a description of the process
transitions t j ) such that O(pi ,t j ) 6= 0 (resp. I(pi ,t j ) 6= 0). A PN
functionality, provided in natural language. This narrative
is consistent (conservative) if there exists X > 0 (Y > 0) such
describes the possible evolution of each controlled variable as
that CX = 0 (Y T C = 0).
function of both the variables states and the actuators states.
Definition 2. Given a PN structure, the marking distribution Variables and actuators interact in two different ways. First,
is defined as a function M : P → Z≥0 , where M(pi ) represents the simultaneous occurrence of variables and actuators state
the number of tokens residing inside the place pi (depicted as changes is represented by a synchronous relation [6], [18].
dots). The marking distribution is expressed as a column vector Second, the permissive relation represents the enabling of a
M of length |P|, where M[i] = M(pi ), ∀pi ∈ P. A PN system variable state change when some actuator is at a particular
is a pair hG, M0 i, where G is a PN structure and M0 is the state [6]. These relations are implied in the process narrative.
initial marking distribution. The marking distribution evolves The Operation Narrative (ON ) is a set of sentences
according to the firing of transitions. A transition t j is enabled describing the required behavior of the system. In particular,
at a marking Mk if ∀pi ∈ •t j , Mk [i] ≥ I(pi ,t j ), this is denoted this narrative indicates ordered sequences of state values that
tj
as Mk →. A transition t j can fire if it is enabled. The firing the actuators and controlled variables must reach in order to
of an enabled transition t j leads to a new marking Mk+1 that produce goods as expected.
can be computed with the so-called PN fundamental equation The following example presents an industrial process de-
Mk+1 = Mk + Cvk , where vk [i] = 0 for i 6= j and vk [ j] = 1. scription, and the translating methodology proposed in this
paper will be illustrated using also this example.
Definition 3. An Interpreted Petri net (IPN) system is a tuple
Q = hG, M0 , ΣI , ΣO , λ, ϕi, where hG, M0 i is a PN system; ΣI is Example 1. A bottle filling system. The P&ID depicted in Fig.
the input alphabet, where each element of the set ΣI is an input 1 represents a bottle filling system. This process is described
symbol; ΣO is the output alphabet, where each element of the as follows.
set ΣO is an output symbol; λ : T → 2ΣI is the input-labeling
function of transitions (a single transition can be associated
with more than one symbol from the input alphabet ΣI ); ϕ : YIC-1 LV -104
BL is BLe . The complete system must perform the following BP1 − 103 BP1a BP1
p
BP2 − 103 BP2a BP2
p
BP3 − 103 BP3a BP3
p
Definition 4. A process graph is the triplet PG = (N, B, D), the union of the labels associated to all the transitions and
where N = {n1 , ..., nq } is a finite set of vertices, and ni places in the module, respectively.
represents the i − th element of the P&ID; B ∪ D ⊂ N × N Module interconnection. The place ph of the module Mi
is a set of arcs, where B represents the permissive relation, is connected to the transition tkl of M j , with a self-loop, if the
and D represents the synchronous relation. event “pk to pl ” is written in the cell defined by the sub-row
rh of ei and the column e j of the permissive relation table. In
If arc (ni , n j ) ∈ B, then ni is an actuator, n j is a variable,
addition, transitions tab ,tcd of modules Mi , M j , respectively,
and there exists a non null cell at row ni and column n j in
are merged into a single one if there exists a mark in the cell
the permissive relation table. If arc (ni , n j ) ∈ D, then ni , n j are
defined by the sub-row “a to b” and the sub-column “c to d”,
both variables and there is a marked cell at row ni and column
respectively, in the synchronous relation table. Notice that by
n j in the Variable relation table. Arcs B are represented with
construction, the IPN model is consistent and conservative.
solid lines and arcs in D are represented with dashed lines.
Fig. 2 represents the process graph of the Example 1. Example 2. Consider the system illustrated in Fig. 1, where
each element is represented by a PN module in Fig. 3. In
p p p
n7 LV-104 this figure, M1 , M2 , ..., M8 represent the PN modules of the
motor, position-1 transmitter, position-2 transmitter, position-3
transmitter, Robot, gripper, valve and bottle, respectively. For
n8 BL-104 n5 p
ZN-103 example, to built the PN module M5 (Robot), the range is
n1 n2 n3 n4 defined as RP1, home, and RP2, and its initial condition as
n6 home, according to the Elements description table. Therefore,
p
ZZ-103 BP1 -103 BP2 -103 BP3 -103 the places of M5 are p51 , p52 , and p53 , and a mark is included in
5
the place p2 , respectively. The transitions t1,25 ,t 5 ,t 5 and t 5
ZCC-103 2,3 3,2 2,1
p
Fig. 2: Process graph for the bottle filling process. and their directed arcs are included in M5 , since the states
of the robot can change in one step from p51 to p52 , from p52
to p53 , from p53 to p52 , and from p52 to p51 , as indicated in the
C. Process IPN model behavior table ZN − 103. The complete process IPN model
In order to translate the previous section into an IPN, is illustrated in Fig. 4, where the synchronous and permissive
every vertex of PG is translated into an IPN module and the relations between PN modules are presented. For instance, the
resulting IPN modules are connected using the synchronous 2 and t 3 in Fig. 3 are merged into a transition
transitions t2,1 1,2
p p
and permissive relations. t M2 ,M3 , since there exists a dashed arc from n2 to n3 in PG
IPN module. The i − th module Mi = (Fig. 2); moreover, two-way arcs are included from the place
Gi , Mi0 , ΣiI , ΣiO , λi , ϕi , where Gi = hPi , Ti , Ii , Oi i, is built p
p12 in M1 to transitions t M2,3 , t M3,8,4 , and t2,14 , since there
for the ni vertex of PG , based on the element behavior table exists a relation between the actuator state on in ZZ-103 and
associated to the i − th element. In detail, Pi = {p1 , ..., pr }, p p
the variable events BP1 to BP2a and BP2a to BP3 in BP1 − 103,
where each place is defined for each row of the behavior table. BP2 − 103, and BP3 − 103 presented in the permissive relation
Moreover, if there is a check mark in the cell defined by the table.
row r j and column ck of the behavior table, then a transition
t jk is defined and arcs from p j to t jk , and from t jk to pk are
defined as well. In this way, there are as many transitions D. Operation narrative tables
as check marks in the behavior table. The initial marking of The operation narrative (ON ) is summarized in tables,
Mi is given by M0i (pk ) = 1 if pk is the initial condition of representing the control specification for the process. The
ei and M0i (pk ) = 0 otherwise. Places are labelled according Operation range table lists the elements and their operation
to the element description table, i.e., ϕi (p j ) = statek if the ranges as given by the P&ID and the ON . The Operation
place p j of the i − th element is associated to the state statek . conditions table describes each required sub-process as a
Moreover, distinct labels are associated to the transitions of sequence of operations, whose occurrence may be conditioned
the actuator elements (all the transitions in the actuators are by the states of the controlled variables. Table V lists the
controllable). The input and output alphabets are defined as elements and their operation ranges for the Example 1.
LV-104 BL-104 TABLE V: Operation range.
ZN-103
Elements Operation range
ZN-103 RH , RP1 , RP2
ZZC-103 Go , Gc
p
BP1 − 103 BP1a , BP1
BP1-103 BP2-103 BP3-103
p
ZZ-103 BP2 − 103 BP2a , BP2
ZCC-103 BP3 − 103 BP3a , BP3
p
BL − 104 BLe , BL f
ZZ-103
BP1-103 BP2-103 BP3-103 states in the cell at the i − th row and the second column;
ZCC-103
˘ j (ti ) = conditioni , where conditioni is the set of states
label λ
in the cell at the i − th row and the third column. Define
the input and output alphabets as the union of the labels
associated to all the transitions and places in the module,
respectively. The resulting modules for Table VI are shown
Fig. 4: Process IPN model of the bottle filling process. in Fig. 5. In order to obtain a suitable specification for the
tracking control paradigm [15], [16], the reachability graph of
the Operation IPN modules is obtained and transformed into an
The Operation conditions shown in Table VI describe the IPN, preserving the place and transition labels. The resulting
required sub-processes for Example 1, where the first column IPN represents the specification IPN model, describing the
is filled with the list of tasks, which in this case are two, process required behavior. The specification of the process of
named “Evacuate bottle” and “Bottle filling”. Each task is Example 1 is shown in Fig. 6.
decomposed in a set of operations, a sub-row is defined for
each of these operations. Each operation is defined as follows:
the column 2 denotes a set of states of controlled variables that
a)
describes pre-conditions when the operation starts; column 4
denotes a set of states of controlled variables that describes the
states when the operation finish (the state that the process must
b)
reach), named target states; column 3 describes conditions that
must be satisfied in order to allow the operation (guards). Fig. 5: Operation IPN modules for the Example 1
Operations are ordered from top to bottom. For instance, in the
first row of Table VI, the pre-condition states are {RH , Go }, the
p
target states are {RP1 , Go }, and the guard is BP3 ; next, the pre-
condition state in the second operation is the previous target
state, i.e. {RP1 , Go }, and the next target state is {RP1 , Gc }. The
rest of the operations are read similarly for both tasks.
E. Operation IPN model
The operation IPN model comprises a set of PN modules
Fig. 6: Specification IPN model for the Example 1.
M jo ; one module is defined for eachD task in the operation E
j j j ˘j
conditions table. Each module M jo = Ğ j , M̆0 , Σ̆I , Σ̆O , λ , ϕ̆ j
is built as follows. For each task, define n places and n IV. E RRORS DETECTION
transitions, where n is the number of operations (rows in Both, the P N and the ON are described in natural lan-
the operation conditions table) related with the task. For any guage, thus they are susceptible of introducing errors due to
i ∈ {1, ..., n}, add an arc from pi to ti and from ti to pi+1 , if omissions, inconsistencies or ambiguities. Omissions occur
j
i + 1 ≤ n; and add an arc from tn to p1 . Define M̆0 (p1 ) = 1 when some elements are declared in the P&ID, but they
j
and M̆0 (pi ) = 0, ∀i 6= 1. Moreover, for any i ∈ {1, ..., n}, label are never mentioned in the narratives; inconsistencies appear
pi as ϕ̆ j (pi ) = pre − statei , where pre − statei is the set of when the narratives include contradictory information; finally,
ambiguities appear when the narratives include information process possible behavior (plant) and another IPN model is
indicating that the same system conditions and inputs could built for the process required behavior (specification). By using
lead to different scenarios. Every step in the methodology is this formal tool, existing control synthesis algorithms can be
verified to ensure the correctness of the derived models. The used to automatically design and implement controllers to en-
error detection is declared as a rule, where the pre-condition is force the required behavior, reducing potential inconsistencies
true when an error is detected, and the post-condition indicates and other errors frequently introduced by manual procedures.
the actions to remove the error. ACKNOWLEDGMENT
A. Error detection in the table element description The research leading to these results has received support
from the Conacyt Fondo Sectorial de Investigación para la
Omissions
Educación, project number 288470.
R1 IF there exists an element label in the P&ID not listed
in the first column of the table THEN ask the user to R EFERENCES
include such element in the table. [1] A. Ibarz and G. V. Barbosa-Cánovas, Unit operations in food engineer-
ing. CRC press, 2002.
R2 IF there is an empty Range cell THEN ask the user [2] D. Popescu, S. Rugaber, N. Medvidovic, and D. M. Berry, “Reducing
to include such information in the P N and in the ambiguities in requirements specifications via automatically created
corresponding cell. object-oriented models,” in Monterey Workshop, ser. Lecture Notes in
Computer Science, P. B. and M. C., Eds., vol. 5320. Springer, 2007,
R3 IF there is an empty Initial state cell THEN ask the pp. 103–124.
user to include such information in the P N and in the [3] F. Pittke, H. Leopold, and J. Mendling, “Automatic detection and
corresponding cell. resolution of lexical ambiguity in process models,” IEEE Transactions
on Software Engineering, vol. 41, no. 6, pp. 526–544, 2015.
Inconsistencies [4] T. Murata, “Petri nets: Properties, analysis and applications,” Proceed-
R4 IF there exists an element in the table that is not included ings of the IEEE, vol. 77, no. 4, pp. 541–580, 1989.
[5] I. Rivera-Rangel, A. Ramı́rez-Treviño, L. I. Aguirre-Salas, and J. Ruiz-
in the P&ID THEN ask the user to remove it from the Leon, “Geometrical characterization of observability in interpreted petri
P N and from the table. nets,” Kybernetika, vol. 41, no. 5, pp. 553–574, 2005.
R5 IF there is an Initial Condition not declared in the Range [6] A. Ramirez-Trevino, E. Ruiz-Beltran, I. Rivera-Rangel, and E. Lopez-
Mellado, “Online fault diagnosis of discrete event systems. a petri
of the table THEN ask the user to correct the information net-based approach,” IEEE Transactions on Automation Science and
in the P N and to update the table. Engineering, vol. 4, no. 1, pp. 31–39, 2007.
[7] M. Skoldstam, K. Akesson, and M. Fabian, “Modeling of discrete event
Other tables are analyzed similarly to detect and remove systems using finite automata with variables,” in Decision and Control,
errors, for the sake of conciseness, we briefly mention them. 2007 46th IEEE Conference on. IEEE, 2007, pp. 3387–3392.
In element behaviors tables, the isolated states are detected. [8] N. Kim, D. Shin, R. Wysk, and L. Rothrock, “Using finite state automata
(fsa) for formal modelling of affordances in human-machine cooperative
These should be connected to be reachable from other states or manufacturing systems,” International Journal of Production Research,
removed. In the permissive table, only reachable states must be vol. 48, no. 5, pp. 1303–1320, 2010.
mentioned in filled cells. In the synchronous table, the marks [9] H. A. Awad, “Modeling of industrial productivity processes,” J. Eng.
Sci. JES, vol. 10, pp. 763–781, 2010.
in the main diagonal must be removed, in this case P N must [10] L.-P. Chung and C.-T. Chang, “Petri-net models for comprehensive haz-
be rewritten. ard analysis of mocvd processes,” Computers & chemical engineering,
After removing possible errors in tables and P N , the PG is vol. 35, no. 2, pp. 356–371, 2011.
[11] P. J. Ramadge and W. M. Wonham, “The control of discrete event
analyzed. It must not include strongly connected components systems,” Proceedings of the IEEE, vol. 77, no. 1, pp. 81–98, 1989.
involving only actuators vertices. This component represents [12] Y. Chen, Z. Li, and M. Zhou, “Optimal supervisory control of flexible
a set of actuators having no effect over controlled variables. manufacturing systems by petri nets: A set classification approach,”
IEEE Transactions on Automation Science and Engineering, vol. 11,
Also, PG must not have isolated controlled variables since it no. 2, pp. 549–563, 2013.
is not actuated, i.e., this controlled variable is not assigned [13] A. Giua and M. Silva, “Modeling, analysis and control of discrete event
to a control loop in the process. In both cases the user must systems: a petri net perspective,” IFAC-PapersOnLine, vol. 50, no. 1,
pp. 1772–1783, 2017.
introduce the relation between actuators and variables in P N [14] A. Dideban and H. Zeraatkar, “Petri net controller synthesis based on
and update tables and PG . Moreover, errors in the specification decomposed manufacturing models,” ISA transactions, vol. 77, pp. 90–
can be captured during the controller design stage. This will 99, 2018.
[15] C. R. Vázquez, J. A. Gómez-Castellanos, and A. Ramı́rez-Treviño,
be addressed in a future work. “Petri nets tracking control for electro-pneumatic systems automation,”
in Informatics in Control, Automation and Robotics (ICINCO) 2018, ser.
V. C ONCLUSIONS Lecture Notes in Electrical Engineering, O. Gusikhin and K. Madani,
Eds., vol. 613. Springer, 2019, pp. 503–525.
In this work, a methodology to translate the representation [16] D. Guevara-Lozano, C. R. Vázquez, and A. Ramı́rez-Treviño, “Towards
of a process from a P&ID to an IPN has been proposed. decentralized control for Petri nets,” in 24th International Conference
on Emerging Technologies and Factory Automation (ETFA), 2019, pp.
The methodology is divided in three stages: first, the relevant 428–435.
information of the process, which is originally described by [17] M. Toghraei, “Principles of p&id development: the tips provided here
a P&ID, a process narrative and an operation narrative is will streamline efforts to develop piping & instrumentation diagrams,”
Chemical Engineering, vol. 121, no. 4, pp. 62–72, 2014.
captured in standarized tables; then a formal representation [18] L. Feng and W. M. Wonham, “Supervisory control architecture for
is derived based on a graph structure, which allows to discard discrete-event systems,” IEEE Transactions on Automatic Control,
irrelevant information; finally, an IPN model is built for the vol. 53, no. 6, pp. 1449–1461, 2008.