Next Article in Journal
Methodology to Optimize Quality Costs in Manufacturing Based on Multi-Criteria Analysis and Lean Strategies
Previous Article in Journal
Investigation of an Influence Function Model as a Self-Rotating Wheel Polishing Tool and Its Application in High-Precision Optical Fabrication
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

On the Design of Regulation Controllers for Automation Systems with RCPetri

by
Carlos Alberto Anguiano-Gijón
,
Anibal Cid-Gaona
,
José Manuel Chávez-Delgado
and
Carlos Renato Vázquez
*
Escuela de Ingenieria y Ciencias, Tecnologico de Monterrey, Av. Ramón Corona 2514, Zapopan 45201, Mexico
*
Author to whom correspondence should be addressed.
Appl. Sci. 2022, 12(7), 3294; https://doi.org/10.3390/app12073294
Submission received: 2 February 2022 / Revised: 4 March 2022 / Accepted: 15 March 2022 / Published: 24 March 2022
(This article belongs to the Section Applied Industrial Technologies)

Abstract

:
Regulation control for Petri nets is a control framework that allows the design of sequence controllers for automation systems in a systematic and efficient way. In order to implement this control framework, the MATLAB® app RCPetri has been developed. In this work, the RCPetri tool functionalities are described, including model generation, automatic specification generation, automatic control design, model and control simulation, automatic translation to PLC code, and communication by Modbus TCP/IP and OPC UA. Furthermore, three examples are presented to illustrate the application of the tool and the regulation framework: an electro-pneumatic device, a process control system, and a robotic manufacturing cell under a decentralized control scheme.

1. Introduction

Petri nets ( P N s ) is a family of mathematical models that have been extensively used for representing and analyzing systems that evolve through the occurrence of events named discrete event systems [1,2,3]. Applications include the analysis of traffic [4], risk assessment [5], biological systems [6], logistics [7,8], and manufacturing systems [9], among others.
One application of P N s that has received a lot of attention in the literature is the design of control algorithms for manufacturing systems. The most common approach consists of the design of places (monitors) that control the firing of transitions, in order to impose a requirement described as a linear inequality, named generalized mutual exclusion constraint (GMEC) [10,11,12,13]. These constraints are useful to enforce safety specifications, avoiding states when two or more processes use the same resource. This control technique has also been extensively investigated to avoid blocking states in particular classes of P N s (see, for instance, [14,15,16,17]). A recent survey on the control of P N s can be found in [18].
Regulation control [19,20,21] is a different control paradigm, the objective of which is to design controllers that impose sequences of sensors and actuators activation. In detail, the system to be controlled, named Plant, is modeled as an Interpreted Petri net ( I P N ), which is an extension of P N s with labels associated with places (representing sensors) and transitions (representing actuators). The required behavior is described as an I P N as well, named Specification, representing required sequences of sensors and actuators activation. Then, a controller is designed as an I P N that enforces the Plant to evolve according to the given Specification. Common problems in automation systems, where the engineer requires to program a routine so the Plant describes a required operations sequence, can be addressed by this approach. The advantage of using this scheme is that the engineer only specifies the required tasks in a high-level description; next, the controller can be automatically generated by using the algorithms that have been developed for this purpose [19,20,21]. Furthermore, once the I P N controller is designed, it can be automatically translated into programmable logic controller (PLC) code for implementation.
In order to perform a practical implementation of the regulation control approach, we have developed a MATLAB® app named RCPetri [22], which is described in this work. The app was designed to help the user to design and implement regulation controllers by following a control design workflow. In a first step, the app allows us to define an I P N that represents the Plant in a graphical way. Next, the user can define the required behavior in high-level fashion by using standard Excel tables, which are automatically translated by the app to an I P N Specification. Later, the controller can be automatically generated. Furthermore, the closed-loop system can be simulated to verify the behavior of the Plant under control. Moreover, the  I P N controller can be automatically translated into PLC code, for its final implementation. Furthermore, a communication module has been implemented, which allows synchronization with other software or hardware through protocols Modbus Internet Protocol Suite (Modbus TCP/IP) and object linking and embedding for process-control-unified architecture (OPC UA). In order to illustrate the use of the app for the synthesis of controllers and their application, three examples are described, as follows:
1.
An electro-pneumatic arm that can perform four different tasks, whose controller is implemented in a PLC;
2.
A process control system simulated in a supervisory control and data acquisition (SCADA) software synchronized to the app via Modbus TCP/IP;
3.
A manufacturing system with two robotic cells, simulated in a dedicated software and synchronized to the app via an OPC UA server, under a decentralized control scheme.
Different research groups have developed software tools for modeling and analyzing different P N types. For instance, GreatSPN [23] and PIPE2 [24] are well-known tools for performance analysis in generalized stochastic P N s . TimeNET [25] allows the analysis of non-Markovian stochastic P N s . Similarly, GPenSIM [26] can be used for performance evaluation in event graphs. CPN Tools [27] and Access/CPN [28] were proposed for the modeling, simulation, and analysis of colored P N s . Continuous and hybrid P N s can be simulated in HYPENS [29] and SimHPN [30]. PNetLab [31] was developed to model and simulate timed/untimed P N s and colored P N s , allowing the possibility to simulate P N s under control, where the controller is a subroutine that provides a conflict resolution policy. In [32], a combination of the graphical editor Petri Net Editor and the toolbox Petri Net Engine is used to implement a P N conflict resolution policy into a microcontroller. All of these tools allow us to graphically define a P N system, simulate the system, and perform particular types of analysis (mainly performance analysis and structural analysis). Nevertheless, despite the large amount of P N software, none of the existing tools allow us to define I P N with place and transition labels, and to synthesize regulation controllers. Moreover, to the best of our knowledge, none of the tools allow us to synchronize P N simulations with external software/hardware via standard protocols, and to automatically generate PLC code. Furthermore, the implementation of RCPetri on MATLAB® will allow other researchers to use it for the analysis and application of other algorithms, such as GMEC control, P N observers, and P N diagnosers, among others.
This paper is organized as follows: Section 2 presents basic definitions on I P N . Section 3 explains the regulation control framework. Section 4 introduces the RCPetri app with its main features, and the algorithms implemented for the main functionalities. Section 5 presents the application of RCPetri in the three examples previously mentioned. Section 6 summarizes the conclusions.

2. Basic Concepts

Basic concepts and definitions concerning P N s and I P N are recalled in this section (for more details see, for instance [3,33]).
Definition 1.
A Petri net ( P N ) structure, N , is a bipartite digraph represented by the 4-tuple N = P , T , I , O , where P = { p 1 , p 2 , . . . , p n } is the finite set of places, T = { t 1 , t 2 , . . . , t m } is the finite set of transitions, I : P × T N 0 is a function representing weighted arcs connecting places to transitions, and  O : P × T N 0 is a function representing weighted arcs connecting transitions to places.
The incidence matrix of N is defined as a | P | × | T | matrix C , such that C [ i , j ] = O ( p i , t j ) I ( p i , t j ) , p i P , t j T . Graphically, places are represented by circles, transitions by rectangles, and arcs by arrows. Given a node v P T , v (resp. v ) denotes the set of nodes directly connected to v (resp. nodes directly connected from v). A P N is said to be a state machine if each transition has only one input and one output place (i.e., t T | t | = | t | = 1 ) and the Petri net graph is strongly connected.
Definition 2.
An Interpreted Petri net ( I P N ) system is a 8-tuple Q = N , M 0 , Σ I , Σ I d , Σ O , λ I , λ I d , φ , where:
  • N is a P N ;
  • M 0 is the initial marking, defined as a function, M 0 : P N 0 , describing the number of tokens (dots) initially residing inside each place;
  • Σ I is the input alphabet—each element of Σ I is an input symbol;
  • Σ I d is the identity alphabet—each element of Σ I d is an identity symbol;
  • Σ O is the output alphabet—each element of Σ O is an output symbol;
  • λ I : T 2 Σ I is the input labeling function that associates transitions to input symbols. A transition can be associated with several input symbols. If  λ I ( t j ) , then the transition t j is said to be controllable, otherwise it is uncontrollable;
  • λ I d : T Σ I d { ϵ } is the identity labeling function, where two transitions cannot have the same identity label and each transition can have one identity label at most; ϵ represents that the transition has not identity label;
  • φ : P 2 Σ O is the output labeling function that associates places to output symbols. A place can be associated with several output symbols.
The marking distribution of an I P N describes the state of the represented dynamical system; the marking changes according to the following rules:
  • Given a current marking distribution, M k : P N 0 , an external observer reads the symbols associated with the marked places, whose set is denoted as φ ( M k ) = { o Σ O | o φ ( p ) , M k ( p ) > 0 } . φ ( M k ) is said to be the current output of the I P N and the symbols of φ ( M k ) are said to be indicated at M k .
  • A transition t j is said to be marking-enabled at marking M k if p i t j , M k ( p i ) I ( p i , t j ) .
  • A transition t j is said to be label-enabled at marking M k if every symbol a λ I ( t j ) is indicated by either the current marking M k or an external agent. If  λ ( t j ) = , then t j is always label-enabled.
  • If t j is marking-enabled and label-enabled at M k , then it is said to be enabled, and it can be fired (denoted as M k [ t j > ). Otherwise, it is said to be disabled.
  • The firing of a transition t j , enabled at M k , leads to a new marking M k + 1 (denoted as M k [ t j > M k + 1 ), caused by removing I ( p i , t j ) tokens to each place p i t j and adding O ( p i , t j ) tokens to each place p i t j .
The marking function M can be expressed as a column vector M N 0 | P | , such that M [ i ] = M ( p i ) , p i P . In this work, both M and M will be called marking, since both represent the same information. Thus, a marking M k + 1 , reached from M k after firing a transition t j , can be computed as M k + 1 = M k + C t j , where t j is the j-th column of the identity matrix of dimension | T | . The function φ can be represented by a | Σ O | × | P | matrix φ , in which φ [ i , j ] = 1 , if p j is labeled with the i-th output symbol and φ [ i , j ] = 0 otherwise. The output vector of the I P N at M k is defined as y k = φ M k .
A firing sequence is a sequence of transitions σ = t i t j t k , such that M 0 [ t i > M 1 [ t j > M m [ t k > M m + 1 . The marking M reached after the firing of σ from a marking M can be computed as M = M + C σ , where σ N 0 | T | is a column vector, named the Parikh vector, defined such that σ [ j ] = k , if t j is fired k times in σ . This is denoted as M [ σ > M , and  M is said to be reachable from M.
A P N system is said to be bounded if k N , such that p P and for any M reachable from M 0 , it holds that M ( p ) k . A  P N system is said to be safe if it is bounded with k = 1 . A  P N system is said to be live if t j T and for any M reachable from M 0 there exists a fireable sequence σ , such that M [ σ > M and t j is (marking) enabled at M .
I P N models for complex systems can be built from I P N component models, by using the synchronous composition. Given two safe I P N Q 1 and Q 2 , the synchronous composition results in another safe I P N Q 3 = Q 1 Q 2 , defined as the union of Q 1 and Q 2 in which the transitions sharing the same identity label are merged, keeping all the transition and place labels. The synchronous composition is commutative and associative.
Example 1.
Consider the double-acting electro-pneumatic actuator driven by a 5/2 valve and its I P N model shown in Figure 1. The incidence matrixCand the output labeling matrix φ is given by the following:
C = 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 , φ = 0 0 1 0 0 0 0 0 0 1 .
The input alphabet is defined as Σ I = { a , b } , where each symbol represents a command signal that allows the change of the valve position (i.e., energizing a coil), which leads to an actuator movement. The output alphabet is defined as Σ O = { A , B } , where each symbol represents the activation of a sensor witnessing the actuator position. Then, transitions { t 1 , t 2 } are controllable, while transitions { t 3 , t 4 , t 5 , t 6 } are uncontrollable. At the initial state (Figure 1a), the actuator is retracted, the initial marking is given by M 0 = [ 0 1 1 0 0 ] T and the output vector is y 0 = [ 1 0 ] T , meaning that sensor A is active. By indicating the symbol b, transition t 2 fires (i.e., coil b is energized), and eventually the sequence σ = t 2 t 5 t 6 occurs, leading to the marking M 3 = [ 1 0 0 0 1 ] T , where the actuator is extended (Figure 1b), resulting in the output vector y 3 = [ 0 1 ] T , meaning that sensor B is active.

3. Regulation Control for IPN

Regulation control is a paradigm, proposed for systems modeled by I P N , developed to induce sequences of output symbols on the system to be controlled, called the Plant. These sequences are specified in a high-level fashion by an I P N , called Specification (see, for instance [19,20,21]). Then, an  I P N , named Controller, is designed for this purpose. Figure 2 shows a scheme describing the closed-loop system. In this, the controller indicates input symbols to the Plant transitions in order to make a selection of the Plant output ( Ω · y ) to be equal to the Specification output ( y ˘ ), otherwise stated, to cause the output error e = y ˘ Ω · y to be null. For this, the controller has access to the complete marking of the Specification ( M ˘ ), since the controller and the Specification are implemented in the same hardware, but it only has access to output signals from the Plant ( y ), since only this information is available through the sensors connected to the controller hardware. In addition, the controller stops the Specification when the output error is not null. The Plant and Specification are formally defined as follows.
Definition 3.
The Plant is a safe live I P N , Q = N , M 0 , Σ I , Σ I d , Σ O , λ I , λ I d , φ , that models the discrete event system to be controlled. Two places cannot generate the same output symbol; moreover, input and output alphabets are disjointed.
Definition 4.
A Specification is a safe, live-state machine IPN. Q ˘ = N ˘ , M 0 ˘ , Σ I ˘ , Σ ˘ I d , Σ ˘ O , λ ˘ I , λ ˘ I d , φ ˘ , together with a function Ω : Σ O Σ ˘ O { ϵ } that relates output symbols from the Plant to Specification output symbols. Each transition of the Specification has a unique identity symbol that is different from those of the Plant.
Methodologies for modeling automated manufacturing systems as I P N have been proposed in [19,21]. Moreover, a methodology for designing I P N specifications has been presented in [34], in which the designer only provides a high-level description of what he wants to observe from the Plant.
Definition 5.
A regulation controller is a safe I P N , Q ^ = N ^ , M ^ 0 , Σ ^ I , Σ ^ I d , Σ ^ O , λ ^ I , λ ^ I d , φ ^ , fulfilling Σ ^ I d Σ I d = (i.e., plant transitions do not share their identity symbols with controller transitions). The closed-loop system is defined as the I P N Q c l = Q Q ˘ Q ^ .
The regulation control problem consists of the synthesis of a controller that enforces the closed-loop system to exhibit the following behavior:
  • if the output error is not null, then all the Specification transitions are disabled, and any fireable sequence drives the Plant to a marking where the output error is null;
  • if the output error is null, then all the Plant transitions are disabled, but none of the Specification transition is disabled by the controller.
A synthesis method for computing such controller was presented in [20]. This method consists of the following three steps:
1.
A marking mapping Π is computed, which relates each specification marking M ˘ k to a Plant marking M k , such that the output error is null, i.e.,  φ ˘ M ˘ k Ω φ M k = 0 . Thus, if the Specification is at M ˘ k , the Controller should drive the Plant to M k = Π M ˘ k . The mapping Π is computed by a linear integer programming problem (LIPP) that minimizes the number of firings between the plant markings (described by Parikh vectors σ k ), subject to φ ˘ = Ω φ Π , Π M ˘ 0 = M 0 , Π C ˘ t k ˘ = C σ k for all t k ˘ T ˘ , and the entries of Π and vectors σ k are non-negative integers.
2.
For each specification transition t ˘ k , such that M ˘ k [ t ˘ k > M ˘ k + 1 , for some reachable M ˘ k , a fireable controllable Plant sequence σ k is computed, such that Π M ˘ k [ σ k > Π M ˘ k + 1 . Thus, if  t ˘ k is fired in the Specification, reaching M ˘ k + 1 , then the  Controller must induce the firing of σ k to reach Π M ˘ k + 1 , so the output error becomes null. This is performed by the A * Algorithm 1, which computes a sequence with the minimum length that drives the Plant from Π M ˘ k to Π M ˘ k + 1 . In the algorithm, the starting node is the empty sequence σ ϵ ; next, for each new node σ , the cost function is defined as f ( σ ) = | σ | + | | σ σ k | | 1 (where | | | | 1 denotes the 1-norm), and the reached marking M r e a c h e d ( σ ) is computed (i.e., Π M ˘ k [ σ > M r e a c h e d ( σ ) ). Some conditions are included to ensure controllability (lines 7–10 and 12).
3.
Finally, an  I P N controller Q ^ is built, which enforces the previously computed Plant sequences σ k , through the indication of Plant input symbols, when the corresponding specification transitions t ˘ k have been fired.
Algorithm 1: Computation of a controllable sequence σ k .
1 Input: I P N Plant structure Q, starting marking Π M ˘ k , ending marking Π M ˘ k + 1 , Parikh vector σ k .
2  Output: Controllable sequence σ k .
3  Initialize O p e n = { σ ϵ } and C l o s e d = . Set M r e a c h e d ( σ ϵ ) = Π M ˘ k . Set f ( σ ϵ ) = | | σ k | | 1 .
Applsci 12 03294 i001
The closed-loop system under the synthesized regulation controller is safe (i.e., bounded), since the Controller only constraints the behavior of the Plant, which is already safe. Moreover, the closed-loop system is live, since the Controller induces the occurrence of each computed sequence, which is fireable and controllable by construction, when the corresponding specification transition fires, and the Specification is live by definition.

4. RCPetri MATLAB® App

Figure 3 shows the steps that a practitioner should follow to implement the regulation control framework. The RCPetri MATLAB®  app was designed to aid engineers to perform each of these steps. The app’s interface (shown in Figure 4) includes a main “Menu area”, a “Visualization panel”, a “Drawing area”, and a “Tab panel”. The app functionality is organized in Tabs, which can be accessed from the “Tab panel” and the “Tabs menu”.

4.1. Defining I P N Models

The first step is to define an I P N model in the “ I P N Tab”, by adding places and transitions to the “Drawing area”. Later, arcs can be defined by clicking on the “Arc icon” at the “Arc subtab” and then selecting the nodes to be connected through the arc. Identity and input symbols can be associated with selected transitions on the “Transition subtab”. Output symbols and tokens can be associated with selected places on the “Places subtab”. Arcs are defined by a set of control points, new control points are added to a selected arc by clicking on the button ( “o” ) (MATLAB® apps can be slow. MathWorks does not currently provide a solution to speed up apps. In the case of RCPetri, the speed depends on the number of nodes and labels to be drawn. It is advised to use the “Zoom tool” to maintain the number of drawn nodes as small as convenient. Additionally, the “Menu Options” provides the possibility to avoid writing labels. Another issue in MATLAB® apps is the mismatch between the cursor and axes coordinates. To correct this, press the “Calibration button” and next click at the center of the red cross).
Once an I P N is drawn, a name must be given and the “Generate button” must be pressed. This will compute all the I P N matrices as defined in Section 2, which are packed in a MATLAB® struct variable with the name of the I P N with the fields Draw (information for drawing the I P N ), M0 ( M 0 ), I (I), O (O), AO ( Σ O ), LP ( φ ), AI ( Σ I ), LT ( λ I ), AID ( Σ I d ), and LTI ( λ I d ). This variable is accessible and editable from the MATLAB® Workspace, and it is used for simulation, composition, and control synthesis. A struct variable containing a previously generated I P N can be uploaded to the app, by using the “Load from WS button”.
Additionally, the “ I P N Tab” allows us to design I P N s in a modular way, by composing I P N s previously generated. However, the app does not currently allow us to define neither subnets nor subsystems. Thus, once a set of nets are composed, they integrate one monolithic I P N system. The “Tree panel” at the right lower corner allows us to change the current I P N by clicking on the name of the desired I P N .

4.2. Simulation

The “Simulate Tab” is used to simulate the current I P N system. Before starting a simulation, the user must click on the reset button (“R”), in order to compute the initially enabled transitions. The simulation can be driven in three ways: by clicking on the enabled transitions on the drawing area, by selecting the transition to fire and pressing the “Step button”, or by pressing the “Play button”; in the last case, a randomly selected enabled transition will fire after a number of milliseconds specified by the user (“Delay”). Marking-enabled transitions are drawn in yellow, while enabled transitions are drawn in green (see Figure 4). External input symbols can be specified by the user at any time in the “Input Symbols” text field, symbols must be separated by commas (e.g., a , b means the simultaneous indication of a and b). Drop down items allows us to select places, transitions and labels in order to visualize their values during the simulation.

4.3. Specification

The Specification I P N can be defined by drawing and generating an I P N (In this case, remember that each specification transition must have a unique identity symbol, which can be automatically generated in the subtab “IPN > Labels”). A more efficient option is to apply the specification generation algorithm of [34], implemented in the “Spec Gen Tab”, which translates a set of standard tables (named “Task table”, “Subtask table’,’ and “Shortcuts table”) into an I P N . These tables can be provided in the Book Editor app (which can be open directly from the “Spec Gen Tab”) or in an Excel file. To automatically compute the Specification I P N , the app applies two steps: first, the description of subtasks and shortcuts are substituted into the “Task table”; later, Algorithm 2 is applied to translate the “Task table” to an I P N .    
Algorithm 2: Building the I P N Specification.
1 Input: Task table.
2  Output:  I P N model Q ˘ representing the Specification.
3 Define the place p ˘ 0 with one token. Label p ˘ 0 with the symbols that define the first operation.
Applsci 12 03294 i002
The “Task Table” must have three columns for the following:
1.
The workstation name (the Plant can be split in workstations).
2.
The task name (one workstation can perform several tasks).
3.
The operation sequence (each task is defined as a sequence of operations).
Each operation is described by the output symbols that are active when it is completed, these must be separated by commas and enclosed by curly brackets; round brackets can be used to define a set of guard signals that must be active to perform the operation (e.g., ( s t a r t , a ) { A , B , C } denotes that both signals s t a r t and a must be active to execute the operation { A , B , C } , characterized by the simultaneous activation of sensors A, B, and C). The first operation in all tasks must be the home position. For clarity, operations can be defined by using subtasksand shortcuts. Subtasks are defined in the “Subtasks table” as sequences of operations. Shortcuts are defined in the “Shortcuts table” as sets of output symbols. Figure 5 shows the tables in an Excel file that describe a specification for the I P N arm model of Figure 4, notice that tasks include subtasks (e.g., H o m e A r m , T a k e I n , etc.), which are defined using shortcuts. In an Excel file, the Tasks, Subtasks, and Shorcuts tables must be located in the first, second, and third sheets, respectively.

4.4. Control Synthesis

Once the Plant and the Specification are defined as I P N , a regulation controller can be computed in the “Controller Tab”, which implements the methodology introduced in [20] and resumed in Section 3, synthesizing an I P N controller that enforces the occurrence of sequences σ k in the Plant to make the output error to be null. For this, the app modifies the Specification output labels (character # is added to each symbol) in order to distinguish them from the Plant output labels, and later, the labels mapping Ω is computed. The computation of the marking mapping Π is performed by the MATLAB® solver i n t l i n p r o g ( ) . Next, sequences σ k are computed with Algorithm 1. Finally, Algorithm 3 is executed to build the I P N Controller. Moreover, the app generates the I P N representing the control program ( Q ˘ | | Q ^ ) and the closed-loop system ( Q | | Q ˘ | | Q ^ ).   
Algorithm 3: Building the I P N Controller.
1 Input: Plant Q. Specification Q ˘ . Matrix Π and sequences σ k .
2 Output:  I P N model Q ^ representing the Controller.
Applsci 12 03294 i003
Example 2.
Figure 6 shows the automatically generated I P N control program (i.e., the synchronization of Specification and Controller) for the Plant of Figure 4 and the Specification of Figure 5. Let us explain the behavior of the closed-loop system. For this, keep in mind that the I P N Plant output symbols are read by the I P N control to enable control transitions, and vice versa. At the initial state, the Plant provides the sensor signals { X A , Y A , V B , Z A } (operation HomeArm at the Specification tables). The first task (In_2_RFID) starts when the guard signals { S 1 O n , T a g O f f , R F I D I d l e } are simultaneously active, leading to the firing of the control transition t 1 , removing tokens from p 1 and p 11 and marking control places p 2 and p 7 . The marking of the control place p 7 indicates the output symbol Z b , i.e., the controller commands the firing of a Plant transition labeled with Z b ( t 18 in Figure 4, which represents energizing coil b of the valve of actuator Z), allowing the Plant to reach the state characterized by the symbols { X A , Y A , V B , Z B } (i.e., the vertical actuator Z is down, corresponding to operation "InDownReleased"). These symbols coincide with those of the control transition t 7 , becoming enabled and thus firing, moving a token from p 7 to p 12 . Next, the control transition t 2 becomes enabled and it fires, removing tokens from p 2 and p 12 and marking the control places p 3 and p 8 . Place p 8 indicates to the Plant to fire the transition labeled with V a ( t 9 in Figure 4, which represents energizing coil a of the valve of the suction cup), allowing us to reach the Plant state characterized by the following symbols: { X A , Y A , V A , Z B } (i.e., the suction cup V is active, corresponding to operation "InDownTaken"). These symbols coincide with those of the control transition t 8 , becoming enabled and firing, moving a token from p 8 to p 13 . Thus, the control transition t 3 becomes enabled and it can fire. This process is repeated until the first task is executed, and then the closed-loop system (both the Plant and the control program) returns to the initial state.

4.5. PLC Code Generation

For implementation, the I P N control program ( Q ˘ | | Q ^ ) can be translated to PLC code in the “PLC Code Tab”. Two languages are supported, Instruction List (IL) and Structured Text (ST). In both cases, the application generates the code in a .txt file that is saved in the current MATLAB® folder. The user can specify the input/output PLC ports for each symbol by means of a “Symbols Table”, which is provided by either the Book Editor app table or an Excel file (in the fourth sheet). The table format in both cases is equal, having four columns: input symbol, input port address, output symbol, and output port address.
Let us explain the translation algorithm. Each place p i of the I P N program is associated with a memory bit ‘M1x’, where x represents the number i. First, a reset button is added, which sets the memories associated with the initially marked places to 1, and the other memories to 0. The second step codifies the dynamic behavior of the I P N program, each t j is codified following the structure: If Precondition Then Postcondition, where the Precondition is such that all the memories associated with the input places of t j must be 1 and all the input ports associated with the symbols in λ I ( t j ) must be active, and the Postcondition is that all the memories associated with the input places of t j are set to 0 and all the memories associated with the output places of t j are set to 1. Finally, each output port associated with an output symbol o i Σ O is activated when the memory associated with a place in { p | o i φ ( p ) } is 1.

4.6. Modbus TCP/IP and OPC UA

The app can synchronize input/output symbols with other software or hardware via Modbus TCP/IP or OPC UA. The app works in a similar way to Client. The “Modbus TCP/OPC-UA Client Tab” allows us to configure the connection. For this, a “Symbols table” must be provided, which relates the input/output symbols with the input/output ports (in the case of Modbus TCP/IP, the ports are numbered consecutively; in the case of OPC UA, the ports must be defined on the OPC UA server as Boolean variables). A Write/Read panel is included to help the user to check for the connection and the correct port assignation.
Once the app is linked, the “Simulate Tab” will allow us to simulate the I P N synchronized with the server. For this, the “Reset button” (R) must be pressed and later the “Sync button” must be pushed. The input signals (input symbols) will be shown in a text field. Signals are read with a frequency specified at the “Refresh Delay text field” in the “Modbus/OPC-UA Client Tab” (delay between consecutive readings in m s ). When an output symbol is generated during the simulation, this is immediately converted to a signal according to the symbols table and sent to the server.

5. Application Examples

In this section, three different examples are presented to illustrate different features of the RCPetri app, involving representative devices and automation systems: a pneumatic system, a process under logic control, and a robotic manufacturing system.

5.1. Pneumatic Arm

This example describes the application of the complete workflow of Figure 3 for the synthesis and implementation of a regulation controller for the electro-pneumatic arm with three degrees of freedom (3-DoF), as shown in Figure 7, which belongs to a small-scale manufacturing cell that assembles wood parts, named caps. According to the workflow, the first step is to obtain the Plant model. For this, the methodology of [19] was used, obtaining the I P N depicted in Figure 4, which consists of four submodels, one for each double-effect pneumatic actuator and another for the suction cup.
The arm must perform four different tasks:
1.
If there is a cap at the conveyor’s I n position without a radio-frequency identification (RFID) tag, then the arm moves it to the RFID station (to attach a RFID tag to it);
2.
If the cap has a RFID tag, then the arm moves it to the computer numerical control (CNC) station (to drill 10 holes on it);
3.
If the RFID station has collocated a tag on a cap, then the arm moves the cap to the CNC station;
4.
If the CNC has drilled a cap, then the arm moves it to the conveyor’s O u t position.
This Specification was written in the tables depicted in Figure 5. For instance, the first task I n _ 2 _ R F I D starts from the H o m e A r m state, characterized by { X A , Y A , Z A , V B } . This task is enabled by the signals S 1 O n (the cap is at the conveyor’s I n position), T a g O f f (the cap does not have a RFID tag) and R F I D I d l e (the RFID station is available). When these are active, the subtask T a k e n I n must be executed, defined as the operation sequence I n D o w n R e l e a s e d , I n D o w n T a k e n and I n U p T a k e n , characterized by { X A , Y A , Z B , V B } (i.e., at the I n position, the suction cup is down and inactive), { X A , Y A , Z B , V A } (i.e., at the I n position, the suction cup is down and active) and { X A , Y A , Z A , V A } (i.e., at the I n position, the suction cup is up and active), respectively. The I P N Specification depicted in Figure 5 was automatically computed with the app.
Next, the Controller, the control program, and the closed-loop behavior were computed with the “Controller tab”. The obtained control program is depicted in Figure 6 and described at the end of Section 4.4, which was translated to an IL PLC code with the “PLC Code tab”, obtaining 554 code lines. This code was used to implement the program in a PLC connected to the actual pneumatic arm, obtaining the desired closed-loop behavior, depicted in Figure 8. Let us remark that the engineer only provided the model of Figure 4 and the Specification tables of Figure 5, from this point, the app automatically transformed the tables to the I P N model, automatically computed the I P N control program of Figure 6, and automatically translated it to PLC code.

5.2. Tank Filling Process

This example exhibits the use of R C P e t r i for the design and simulation of a logic controller for a tank filling process, simulated in the SCADA software LabVIEW®, in real-time through the Modbus TCP/IP protocol.
The tank filling process considered here (adapted from [35]) is described by the piping and instrumentation diagram (P&ID) of Figure 9. The Plant model was obtained by using the industrial process modeling methodology presented in [21]. In this case, the sensors and actuators were modeled as two-state devices. Tank levels were model as variables with three discrete states (empty, low, high), excepting the water tank that also includes the state medium. These states can be inferred by level sensors LT, for instance, for Soap Tank 101, both sensor LT-1 and sensor LT-2 are inactive when the tank is at the empty state, named T1empty; sensor LT-1 is active and LT-2 is inactive at low state, named T1low; both sensors LT-1 and LT-2 are active at the high state, named T1high. In order to ensure controllability, additional input symbols δ were added to transitions representing a level change, these allow actuators’ controllable transitions to preempt level transitions ( δ means waiting until the level change).
For the Specification, two different filling sequences were considered. In the first one, called “Small”, Soap Tank 103 is supplied by Soap Tank 101, the Water Tank 104 is supplied up to the middle level, next the fluids of Soap Tank 103 and Water Tank 104 are mixed in the Mixing Tank 105. In the second sequence, called “Large”, Soap Tank 103 is filled by both Soap Tank 101 and Soap Tank 102, while Water Tank 104 is filled up to the high level, then the fluids are mixed in the Mixing Tank 105. The Specification is described in the tables in Figure 10.
Once the I P N Specification was synthesized, the Controller was computed. The I P N closed-loop system is validated by simulation for implementation. The Plant was simulated on LabVIEW® as a hybrid dynamical system (the tank levels evolve with continuous dynamics while pumps, valves and sensors evolve as state machines). Figure 11 depicts the tank filling dynamics during the “Large” sequence, under the control program being simulated in the app and connected through Modbus TCP/IP. Note that at the end of the filling of Tank 101, the control program allows the Tank 102 to start filling immediately. The simulation showed the effectiveness of the control program, as well as the interaction between R C P e t r i and other software (in this case LabVIEW®) in real-time. Figure 12 shows the simulation of the Plant synchronized through Modbus TCP/IP with the I P N control program, when the Water tank is filling the Mixing Tank during the “Large" task sequence.

5.3. Robotic Manufacturing System

In this example, a manufacturing system composed of two robotic cells is considered. The objective is to show the effectiveness of R C P e t r i for the implementation of a decentralized control scheme using the OPC UA protocol. For this, the Plant is simulated in the PLC training platform FACTORY I/O (see Figure 13), and two controllers are simulated in different app instances.
Each robotic cell is composed of a raw parts emitter ( L e m i t and B e m i t ), an input conveyor belt ( L r c and B r c ), a robotic arm ( L s and B s ), a CNC machine ( L p r o and B p r o ), and two output conveyor belts ( L e c 1 , L e c 2 , B e c 1 and B e c 2 ). In addition, both cells share an output conveyor belt E c and a manufactured parts remover R e m . Each robotic arm has a predefined program, which consists of moving a part from the entry to the CNC machine, wait for processing, and then moving the part to the exit. Each CNC machine can manufacture either bases or lids. Four sensors, L e n 1 , L e n 2 , B e n 1 , and B e n 2 , indicate the presence of raw parts at different positions on the input conveyors, while the sensors L e x 1 , , L e x 6 , B e x 1 , , B e x 6 indicate the presence of manufactured parts on the output conveyors (Some sensors send a 1 as a logic signal when no object is present (sending a 0 in the opposite case), this can be handled in the app by using negation symbols ¬ in the output labels (e.g., ¬ L e x 1 )).
The Plant was modeled according to the methodology of [19]. Output labels were added to places representing actuator states, describing virtual sensors that allow the computation of controllable sequences. The system was required to perform lids production in the left cell and bases production in the right cell. This desired behavior was translated into two different I P N Specifications, one Specification for the production of lids and the other for the production of bases. Later, each corresponding I P N Controller was synthesized, obtaining a decentralized control scheme, as explained in [19].
Figure 13 displays the control simulation. Here, the Plant under the two synthesized control programs is running in FACTORY I/O. Both control programs are executed simultaneously, each one running in a different R C P e t r i instance, synchronized through the OPC UA protocol. In this case, the Prosys OPC UA Simulation Server platform was used. This communication architecture made possible to effectively implement a decentralized control scheme.

6. Conclusions and Future Work

In this work, we have presented the main features of the RCPetri app, which allows us to efficiently and graphically define I P N models, simulate I P N s, automatically generate I P N specifications, automatically synthesize I P N controllers using the regulation control approach, translate I P N control programs into PLC code, and communicate with other software/hardware by using the Modbus TCP/IP and OPC UA protocols. In this way, the app can assist users to efficiently design and implement controllers through the complete control design workflow. In order to illustrate the features of the app, three examples were presented, being representative of common industrial automation systems: the design and PLC implementation of a controller for a pneumatic arm by applying the complete control design workflow; the design and simulation of a logic control of a filling tanks system, showing the synchronization of the I P N controller simulation in the app with the tanks simulation in LabVIEW®; finally, the design and simulation of a system composed of two robotic cells, showing the possibility to synchronize two instances of the app, each one controlling a different part of the Plant, with the Plant simulation in the software FACTORY I/O via the OPC UA protocol, obtaining a decentralized control architecture.
There are some aspects that have been identified as limitations that will be addressed in future releases. In particular, MATLAB® apps tend to be slow when drawing several items, thus the drawing of large nets in the app becomes impractical. The current I P N model does not integrate time information, which becomes relevant in some practical applications. Moreover, even if the app can be used to define and simulate unsafe nets, the current control synthesis algorithm cannot deal with unsafe nets. In future releases, methods for dealing with large nets and verifying specifications and controllers will be also included.

Author Contributions

Methodology, C.A.A.-G.; software, A.C.-G.; validation, J.M.C.-D.; investigation, C.R.V. All authors have read and agreed to the published version of the manuscript.

Funding

The research leading to these results has received funding from the Conacyt Program for Education, project number 288470.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Murata, T. Petri Nets: Properties, Analysis and Applications. Proc. IEEE 1989, 77, 541–580. [Google Scholar] [CrossRef]
  2. Silva, M. Introducing Petri nets. In Practice of Petri Nets in Manufacturing; Chapman & Hall: London, UK, 1993; pp. 1–62. [Google Scholar]
  3. David, R.; Alla, H. Discrete, Continuous, and Hybrid Petri Nets; Springer: Berlin/Heidelberg, Germany, 2010. [Google Scholar]
  4. Ng, K.M.; Reaz, M.B.I.; Ali, M.A.M. A review on the applications of Petri nets in modeling, analysis, and control of urban traffic. IEEE Trans. Intell. Transp. Syst. 2013, 14, 858–870. [Google Scholar] [CrossRef]
  5. Kabir, S.; Papadopoulos, Y. Applications of bayesian networks and Petri nets in safety, reliability, and risk assessments: A Review. Saf. Sci. 2019, 115, 154–175. [Google Scholar] [CrossRef]
  6. Liu, F.; Heiner, M.; Gilbert, D. Fuzzy Petri nets for modeling of Uncertain Biological Systems. Brief. Bioinform. 2020, 21, 198–210. [Google Scholar]
  7. Cavone, G.; Dotoli, M.; Seatzu, C. A Survey on Petri Net Models for Freight Logistics and Transportation Systems. IEEE Trans. Intell. Transp. Syst. 2018, 19, 1795–1813. [Google Scholar] [CrossRef]
  8. Idel Mahjoub, Y.; Chakir El-Alaoui, E.h.; Nait-Sidi-Moh, A. Logistic Network Modeling and Optimization: An approach based on (MAX,+) algebra and coloured Petri Nets. Comput. Ind. Eng. 2021, 158, 107341. [Google Scholar] [CrossRef]
  9. Campos, J.; Seatzu, C.; Xie, X. Formal Methods in Manufacturing; CRC Press: Boca Raton, FL, USA, 2014. [Google Scholar]
  10. Giua, A.; DiCesare, F. Supervisory design using Petri nets. In Proceedings of the 30th IEEE Conference on Decision and Control, Brighton, UK, 11–13 December 1991; pp. 92–97. [Google Scholar]
  11. Giua, A.; DiCesare, F.; Silva, M. Generalized Mutual Exclusion Constraints on Nets with Uncontrollable Transitions. In Proceedings of the 1992 IEEE International Conference on Systems, Man, and Cybernetics, Chicago, IL, USA, 18–21 October 1992; pp. 974–979. [Google Scholar]
  12. Moody, J.O.; Antsaklis, P.J. Supervisory Control of Discrete Event Systems Using Petri Nets; Kluwer Academic Publishers: Boston, MA, USA, 1998. [Google Scholar]
  13. Basile, F.; Cordone, R.; Piroddi, L. Integrated design of optimal supervisors for the enforcement of static and behavioral specifications in Petri net models. Automatica 2013, 49, 3432–3439. [Google Scholar] [CrossRef]
  14. Li, Z.; Zhou, M. On siphon computation for deadlock control in a class of Petri nets. IEEE Trans. Syst. Man Cybern. Part A Syst. Hum. 2008, 38, 667–679. [Google Scholar]
  15. Chen, Y.; Li, Z.; Khalgui, M.; Mosbahi, O. Design of a maximally permissive liveness-enforcing Petri net supervisor for flexible manufacturing systems. IEEE Trans. Autom. Sci. Eng. 2011, 8, 374–393. [Google Scholar] [CrossRef]
  16. Li, Z.; Wu, N.; Zhou, M. Deadlock control for automated manufacturing systems based on Petri nets. IEEE Trans. Syst. Man Cybern. Part C Appl. Rev. 2012, 42, 437–462. [Google Scholar]
  17. Wang, S.; Wang, C.; Zhou, M.; Li, Z. A method to compute strict minimal siphons in a class of Petri net based on loop resource subsets. IEEE Trans. Syst. Man Cybern. Part A Syst. Hum. 2012, 42, 226–237. [Google Scholar] [CrossRef]
  18. Giua, A.; Silva, M. Petri nets and Automatic Control: A historical perspective. Annu. Rev. Control 2018, 45, 223–239. [Google Scholar] [CrossRef]
  19. Vázquez, C.; Gómez-Castellanos, J.; Ramírez-Treviño, A. Petri nets tracking control for electro-pneumatic systems automation. In International Conference on Informatics in Control, Automation and Robotics; Lecture Notes in Electrical Engineering; Gusikhin, O., Madani, K., Eds.; Springer: Cham, Swiztherland, 2019; Volume 613, pp. 503–525. [Google Scholar]
  20. Guevara-Lozano, D.; Vázquez, C.; Ramírez-Treviño, A. Towards decentralized tracking control for Petri nets. In Proceedings of the 2019 24th IEEE International Conference on Emerging Technologies and Factory Automation (ETFA), Zaragoza, Spain, 10–13 September 2019; pp. 428–435. [Google Scholar]
  21. Rozo-Ibañez, D.; Ruiz-León, J.; Guevara-Lozano, D.; Vázquez, C. Petri net modeling of industrial processes from a P&ID description. In Proceedings of the International Conference on Control, Decision and Information Technologies, Prague, Czech Republic, 29 June–2 July 2020; pp. 715–720. [Google Scholar]
  22. Gaona, A.C.; Vazquez, C.R. RCPetri 1.2. 2022. Available online: https://github.com/CRVazquezT/RCPetri/find/main (accessed on 1 February 2022).
  23. Chiola, G.; Franceschinis, G.; Gaeta, R.; Ribaudo, M. GreatSPN 1.7: Graphical Editor and Analyzer for Timed and Stochastic Petri Nets. Perform. Eval. Spec. Issue Perform. Model. Tools 1995, 24, 47–68. [Google Scholar] [CrossRef]
  24. Dingle, J.; Knottenbelt, W.; Suto, T. PIPE2: A Tool for the Performance Evaluation of Generalised Stochastic Petri Nets. ACM SIGMETRICS Perform. Eval. Rev. 2009, 36, 34–39. [Google Scholar] [CrossRef]
  25. Kelling, C.; German, R.; Zimmermann, A.; Hommel, G. TimeNET: Evaluation tool for non-Markovian stochastic Petri nets. In Proceedings of the IEEE International Computer Performance and Dependability Symposium, Urbana-Champaign, IL, USA, 4–6 September 1996; p. 62. [Google Scholar]
  26. Davidrajuh, R.; Skolud, B.; Krenczyk, D. Performance evaluation of discrete event systems with GPenSIM. Computers 2018, 7, 8. [Google Scholar] [CrossRef] [Green Version]
  27. Jensen, K.; Kristensen, L.M.; Wells, L. Coloured Petri nets and CPN Tools for modelling and validation of Concurrent Systems. Int. J. Softw. Tools Technol. Transf. 2007, 9, 213–254. [Google Scholar] [CrossRef]
  28. Westergaard, M.; Kristensen, L.M. The Access/CPN framework: A tool for interacting with the CPN tools simulator. In International Conference on Applications and Theory of Petri Nets; Springer: Berlin/Heidelberg, Germany, 2009; pp. 313–322. [Google Scholar]
  29. Sessego, F.; Giua, A.; Seatzu, C. HYPENS: A Matlab tool for timed discrete, continuous and hybrid Petri nets. In International Conference on Applications and Theory of Petri Nets; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2008; Volume 5062, pp. 419–428. [Google Scholar]
  30. Júlvez, J.; Mahulea, C.; Vázquez, C. SimHPN: A MATLAB Toolbox for simulation, analysis and design with hybrid Petri nets. Nonlinear Anal. Hybrid Syst. 2012, 6, 806–817. [Google Scholar] [CrossRef]
  31. Basile, F.; Carbone, C.; Chiacchio, P. Simulation and analysis of discrete-event control systems based on Petri nets using PNetLab. Control Eng. Pract. 2007, 15, 241–259. [Google Scholar] [CrossRef]
  32. Kučera, E.; Haffner, O.; Drahoš, P.; Leskovský, R.; Cigánek, J. PetriNet Editor + PetriNet Engine: New Software Tool For Modelling and Control of Discrete Event Systems Using Petri Nets and Code Generation. Appl. Sci. 2020, 10, 7662. [Google Scholar] [CrossRef]
  33. Ramírez-Treviño, A.; Rivera-Rangel, I.; López-Mellado, E. Observability of Discrete Event Systems Modeled by Interpreted Petri nets. IEEE Trans. Robot. Autom. 2003, 19, 557–565. [Google Scholar] [CrossRef]
  34. Guevara-Lozano, D.; Vázquez, C.; Ramírez-Treviño, A. Automatic Specification Generation for Tracking Control in Interpreted Petri nets. In Proceedings of the International Conference on Control, Decision and Information Technologies, Prague, Czech Republic, 29 June–2 July 2020; pp. 341–346. [Google Scholar]
  35. Gharte, M. Automation of soap windscreen washer filling machine with PLC and LabVIEW. In Proceedings of the 2016 International Conference on Automatic Control and Dynamic Optimization Techniques (ICACDOT), Pune, India, 9–10 September 2016; pp. 469–472. [Google Scholar]
Figure 1. I P N model for an electro-pneumatic assembly: (a) the pneumatic actuator is retracted; (b) the actuator is extended.
Figure 1. I P N model for an electro-pneumatic assembly: (a) the pneumatic actuator is retracted; (b) the actuator is extended.
Applsci 12 03294 g001
Figure 2. Regulation control scheme for I P N .
Figure 2. Regulation control scheme for I P N .
Applsci 12 03294 g002
Figure 3. Workflow for the synthesis of controllers using regulation control framework.
Figure 3. Workflow for the synthesis of controllers using regulation control framework.
Applsci 12 03294 g003
Figure 4. RCPetri app interface, showing the simulation of an I P N model of a 3-DoF pneumatic arm with a suction cup. The transition marked in green is enabled, while the transitions marked in yellow are marking-enabled. The current output symbols are { X A , Y A , Z A , V B } .
Figure 4. RCPetri app interface, showing the simulation of an I P N model of a 3-DoF pneumatic arm with a suction cup. The transition marked in green is enabled, while the transitions marked in yellow are marking-enabled. The current output symbols are { X A , Y A , Z A , V B } .
Applsci 12 03294 g004
Figure 5. “Task table” (upper left), “Subtask table” (lower left) and “Shortcuts table” (right) in an Excel file describing the Specification of the 3-DoF pneumatic arm of Figure 4. Afterwards, the I P N Specification is automatically computed from the tables.
Figure 5. “Task table” (upper left), “Subtask table” (lower left) and “Shortcuts table” (right) in an Excel file describing the Specification of the 3-DoF pneumatic arm of Figure 4. Afterwards, the I P N Specification is automatically computed from the tables.
Applsci 12 03294 g005
Figure 6. I P N control program generated for the 3-DoF pneumatic arm model of Figure 4 and the four tasks defined in the Specification of Figure 5. Due to the size of the I P N , it is shown in detail (zoomed in) with the first instructions for the first task.
Figure 6. I P N control program generated for the 3-DoF pneumatic arm model of Figure 4 and the four tasks defined in the Specification of Figure 5. Due to the size of the I P N , it is shown in detail (zoomed in) with the first instructions for the first task.
Applsci 12 03294 g006
Figure 7. Small-scale manufacturing cell. The pneumatic arm has 3-DoF controlled by the same number of double-effect pneumatic actuators and a suction cup. This arm moves caps between the conveyor, the RFID station, and the CNC station (see the schematic from top view at the right).
Figure 7. Small-scale manufacturing cell. The pneumatic arm has 3-DoF controlled by the same number of double-effect pneumatic actuators and a suction cup. This arm moves caps between the conveyor, the RFID station, and the CNC station (see the schematic from top view at the right).
Applsci 12 03294 g007
Figure 8. Displacement–time diagrams showing the sequences performed by each actuator during each of the four tasks defined in the Specification. Times are approximated, obtained by visual inspection.
Figure 8. Displacement–time diagrams showing the sequences performed by each actuator during each of the four tasks defined in the Specification. Times are approximated, obtained by visual inspection.
Applsci 12 03294 g008
Figure 9. P&ID of a tank filling process (Plant for the tank filling process example).
Figure 9. P&ID of a tank filling process (Plant for the tank filling process example).
Applsci 12 03294 g009
Figure 10. Tasks, Subtasks, and Shortcuts tables describing the Specification for the Plant of Figure 9.
Figure 10. Tasks, Subtasks, and Shortcuts tables describing the Specification for the Plant of Figure 9.
Applsci 12 03294 g010
Figure 11. Dynamic behavior of the tanks levels through the “Large” sequence. First, Soap Tank 1 (blue) is filled until sensor LT-2 101 is active; next, Soap Tank 2 (orange) is filled until LT-2 102 is active; then, Water Tank (violet) is filled until LT-3 104 is active; then, both Soap Tank 1 and Soap Tank 2 are drained into Soap Tank 3 (yellow); after this, both Soap Tank 3 and water Tank are drained into Mixing Tank (green); finally the Mixing Tank is drained and the system returns to the initial state.
Figure 11. Dynamic behavior of the tanks levels through the “Large” sequence. First, Soap Tank 1 (blue) is filled until sensor LT-2 101 is active; next, Soap Tank 2 (orange) is filled until LT-2 102 is active; then, Water Tank (violet) is filled until LT-3 104 is active; then, both Soap Tank 1 and Soap Tank 2 are drained into Soap Tank 3 (yellow); after this, both Soap Tank 3 and water Tank are drained into Mixing Tank (green); finally the Mixing Tank is drained and the system returns to the initial state.
Applsci 12 03294 g011
Figure 12. Simulation and control of the tank filling process. When the high-level sensor LT2-105 is activated, it will send a signal for the enabled transition to be fired. On the other hand, in the “Simulation Tab” the user can see the output symbols present in the plant.
Figure 12. Simulation and control of the tank filling process. When the high-level sensor LT2-105 is activated, it will send a signal for the enabled transition to be fired. On the other hand, in the “Simulation Tab” the user can see the output symbols present in the plant.
Applsci 12 03294 g012
Figure 13. Simulation and control of the robotic manufacturing system. Controller A drives the lids production (left cell), while Controller B drives the bases production (right cell). Each control program is running in a different instance.
Figure 13. Simulation and control of the robotic manufacturing system. Controller A drives the lids production (left cell), while Controller B drives the bases production (right cell). Each control program is running in a different instance.
Applsci 12 03294 g013
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Anguiano-Gijón, C.A.; Cid-Gaona, A.; Chávez-Delgado, J.M.; Vázquez, C.R. On the Design of Regulation Controllers for Automation Systems with RCPetri. Appl. Sci. 2022, 12, 3294. https://doi.org/10.3390/app12073294

AMA Style

Anguiano-Gijón CA, Cid-Gaona A, Chávez-Delgado JM, Vázquez CR. On the Design of Regulation Controllers for Automation Systems with RCPetri. Applied Sciences. 2022; 12(7):3294. https://doi.org/10.3390/app12073294

Chicago/Turabian Style

Anguiano-Gijón, Carlos Alberto, Anibal Cid-Gaona, José Manuel Chávez-Delgado, and Carlos Renato Vázquez. 2022. "On the Design of Regulation Controllers for Automation Systems with RCPetri" Applied Sciences 12, no. 7: 3294. https://doi.org/10.3390/app12073294

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop