Industrial Automation
Industrial Automation
Industrial Automation
Industrial Automation
(Automação de Processos Industriais)
Supervised Control of
Discrete Event Systems
http://users.isr.ist.utl.pt/~jag/courses/api1617/api1617.html
Syllabus:
...
Page 2
IST / DEEC / API Chap. 9 – Supervised Control of DES
Tutorial: http://vita.bu.edu/cgc/MIDEDS/
http://www.daimi.au.dk/PetriNets/
Supervisory
Control
And
Data
Acquisition
Page 4
IST / DEEC / API Chap. 9 – Supervised Control of DES
Supervision of DES
SCADA interface / GUI
Page 5
IST / DEEC / API
SCADA example,
Rail Monitoring
and Control
Page 6
IST / DEEC / API Chap. 9 – Supervised Control of DES
Supervision of DES
SCADA vs ICS
Industrial Control Systems (ICS):
- Supervisory Control and Data Acquisition (SCADA) systems,
- Distributed Control Systems (DCS), or
- smaller configurations such as skid-mounted PLCs
Page 7
IST / DEEC / API Chap. 9 – Supervised Control of DES
Supervision of DES
SCADA topics
• Remote monitoring of the state of automation systems
• Logging capacity (resorting to specialized Databases)
• Able to access to historical information (plots along time,
with selectable periodicity)
• Advanced tools to design Human-Machine interfaces
• Failure Detection and Isolation capacity (threshold and/or
logical functions) on supervised quantities
• Access control
Page 8
IST / DEEC / API
Supervision of DES
SCADA system general layout
Page 9
IST / DEEC / API Chap. 9 – Supervised Control of DES
Supervision of DES
Hardware Support Architecture of SCADA
A1 A1 MTU Legend:
...
MTU - Main Terminal Unit
Field Bus
RTU - Remote Term. Unit
S – Sensor
... ...
RTU1 RTUn S1 S1 A - Actuator
More terminology: Field Bus (IEC 61158) / PROFIBUS (Field Bus type,
Siemens), MODBUS (Schneider)
Page 10
IST / DEEC / API Chap. 9 – Supervised Control of DES
Supervision of DES
Examples of software packages including
SCADA solutions
Page 11
IST / DEEC / API Chap. 9 – Supervised Control of DES
Supervision of DES
And
Now
Something
Completely
Different
Page 12
IST / DEEC / API Chap. 9 – Supervised Control of DES
Supervision of DES
Page 13
IST / DEEC / API Chap. 9 – Supervised Control of DES
Supervision of DES
Some history on Supervised Control
Page 14
IST / DEEC / API Chap. 9 – Supervised Control of DES
Supervision of DES
Page 15
IST / DEEC / API Chap. 9 – Supervised Control of DES
Supervision of DES
Place Invariants
Place invariants are sets of places whose token count remains always constant.
Place invariants can be computed from integer solutions of wT D = 0. Non-zero
entries of w correspond to the places that belong to the particular invariant.
• Constraints on the events and timings (that can be expressed, in general, as linear
constraints)
Page 16
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Analysis/Synthesis
Method of the Matrix Equations (just to remind)
k 1 k Dqk
where:
μ(k+1) - marking to be reached
μ (k) - initial marking
q(k) - firing vector (transitions)
D - incidence matrix. Accounts the balance of
tokens, giving the transitions fired.
Page 17
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Analysis/Synthesis
How to build the Incidence Matrix? (just to remind)
For a Petri net with n places and m transitions
N0 n
q N0
m
Methods of Synthesis
Some notation for the method
• The supervised system is modelled as a Petri net with
n places and m transitions, and incidence matrix
DP nm .
• The supervisor is modelled as a Petri net with nC
places and m transitions, and incidence matrix
nC m
DC .
• The resulting total system has an incidence matrix
D ( n nC )m .
Page 19
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Theorem: Synthesis of Controllers based on Place Invariants (T1)
Given the set of linear state constraints that the supervised system must
follow, written as
L P b, P N0n , L Z nC n and b Z nC .
If b L P0 0,
then the controller with incidence matrix and the initial marking, respectively
DC LDP , and C b L P ,
0 0
enforce the constraints to be verified for all markings obtained from the initial
marking.
Page 20
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Theorem - proof outline :
DC
Methods of Synthesis
Example of controller synthesis: Mutual Exclusion
Linear constraint: 2 4 1
p1 . . p
3
1
that can be written as:
t1 t3
p p L P b 0 1 0 1 2 1.
2 4 3
t2 t4 4
1 1 0 0 1
1 1 0 0 0
Incidence
DP and initial P0 .
Matrix 0 0 1 1 marking 1
0 0 1 1 0
Page 22
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example of controller synthesis: Mutual Exclusion
1
1) Test 0
b L P0 1 0 1 0 1 1 0.
1
OK.
0
2) Compute
1 1 0 0
1 1 0 0
DC LDP 0 1 0 1 1 1 1 1,
0 0 1 1
and 0 0 1 1
C b L P 1.
0 0
OK.
Page 23
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example of controller synthesis: Mutual Exclusion
1 1 00
3) Resulting in 1 1 0 0
D0 0 1 1
p1 . . p 0 0 1 1
3
1 1 1 1
t1 t3
1
0
p pC p
2 4 0 1
t4 OK.
t2 0 UAU!!!.
1
Page 24
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example of controller synthesis: Mutual Exclusion
Result using the function
LINENF.m of the
toolbox SPNBOX:
Page 25
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Definition:
Lemmas:
Page 26
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example of controller synthesis s N 0 , t N 0 , n N 0
n Readers / 1 Writer Linear constraint 2 n 4 n
(max n readers or 1 writer)
p1 s t p
3
That can be written as: 1
t1 t3
L P b 0 1 0 n 2 n.
p p
3
2 4
4
t2 t4
1 1 0 0 s
1 1 0 0 0
Incidence
DP and initial P0 .
Matrix 0 0 1 1 marking t
0 0 1 1 0
Page 27
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example of controller synthesis
n Readers / 1 Writer s
1) Test 0
b L P0 n 0 1 0 n n 0.
t
OK.
0
2) Compute
1 1 0 0
1 1 0 0
DC LDP 0 1 0 n 1 1 n n,
0 0 1 1
and 0 0 1 1
C b L P n.
0 0 OK.
Page 28
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
1 1 0
0
Example of controller synthesis 1 1 0
0
n Readers / 1 Writer
D0 0 1 1
3) Resulting in
0 0 1 1
1 1 n n
p1 s t p
3 s
t1 n 0
t3
0 t
n pC
p p 0
2 4
t4 n OK.
t2 n UAU!!!.
Page 29
IST / DEEC / API Chap. 9 – Supervised Control of DES
Supervision of DES
Page 30
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example of controller synthesis: s Producers / t Consumers
Incidence Initial
p1 s t p matrix marking
3
t1
1 1 0 0 s
t3 1 1 0 0 0
DP P0 .
p p 0 0 1 1 t
2 4
0 0 1 1 0
t2 t4
Methods of Synthesis
Generalized linear constraint
Let the generalized linear constraint be
L P FqP Cv P b,
P N 0 n , vP N 0 m , qP N 0 m ,
nC n nC m nC m
LZ ,F Z ,C Z ,e b Z nC
,
where
* P is the marking vector for system P;
C b L P Cv P 0 ,
0 0
guarantees that constraints are verified for the states resulting from the
initial marking.
Page 33
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example of controller synthesis s N 0 , t N 0 , n N 0
Producer / Consumer Linear constraint: v3 v2
p1 s t p that can be written as:
3
v1
t1 t3 CvP b v
L 0, F 0
0 1 1 0 2
0.
p p v3
2 4
t2 t4 v4
1 1 0 0 s
1 1 0 0 0
Incidence Initial .
DP P
t
0 0 1 1
0
matrix marking
0 0 1 1 0
Page 34
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example of controller synthesis
Producer / Consumer
1) Test b L P0 0 0 0.
OK.
2) Compute DC max 0, LD P C , F
DC max 0, F max 0, LD P C min 0, LD P C ,
and C b L P Cv P 0 ,
0 0
C b L P 0 0 0.
0 0
OK.
Page 35
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
1 1 0 0
Example of controller synthesis 1 1 0 0
Producer / Consumer
D 0 0 1 1
3) Resulting in
0 0 1 1
0 1 1 0
p1 s t p
3 s
t1 0
t3
0 t
pC
p p 0
2 4
t4 0 OK.
t2
UAU!!!.
Page 36
IST / DEEC / API Chap. 9 – Supervised Control of DES
Page 37
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example of controller synthesis
Incidence Initial
Bounded
Producer / p1 s t p matrix marking
3
Consumer t1 t3 1 1 0 0 s
1 1 0 0 0
DP P0 .
p p 0 0 1 1 t
2 4
0 0 1 1 0
t2 t4
Page 38
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example of controller synthesis
Bounded Producer / Consumer
1) Test 0
b L P0 b 0. OK.
2) Compute n
0 1 1 0 0 0 1 0
D max 0,
, 0 ,
0 1 1 0 0 1 0 0
C
0 1 1 0 0 1 1 0
DC max 0, 0 max 0, min 0,
0 1 1 0 0 1 1 0
0 0 0 0 0 1 0 0 0 1 0 0
.
0 0 0 0 0 0 1 0 0 0 1 0
and
0 OK.
C b L P .
n
0 0
Page 39
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis 1 1 0 0
Example of controller synthesis 1 1 0 0
Bounded Producer / Consumer 0 0 1 1
D
0 0 1 1
3) Resulting in
0 1 1 0
p1 s t p
3
0 1 1 0
pC s
t1 2 t3 0
n
t
p
2
p
4
0
0 OK.
t2 pC t4 0 UAU!!!.
1
n
Page 40
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis:
adding Uncontrollable and Unobservable transitions
Proposition:
In a Petri net based controller, both input and output arcs to/from plant transitions are
used to trigger state changes in the controller. Since a controller cannot have arcs
connecting to unobservable transitions, then all unobservable transitions are also
implicitly uncontrollable.
Page 41
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis:
adding Uncontrollable and Unobservable transitions
Page 42
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Note: ii) indicates that the firing of uncontrollable transitions can never lead from a
state that satisfies the constraint to a new state that does not satisfy the constraint.
Page 43
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Proposition: Admissibility of a constraint
A linear constraint is admissible iff
• The initial markings satisfy the constraint.
• There exists a controller with maximal permissivity that forces the
constraint and does not inhibit any uncontrollable transition.
Page 44
IST / DEEC / API Chap. 9 – Supervised Control of DES
If there exists L R1 R2 L
'
such that LP b
' '
b ' R2 b 1 1,
Methods of Synthesis
Example: design controller with t1 unobservable (1/4)
Methods of Synthesis
Example: design controller with t1 unobservable (2/4)
Page 47
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example: design controller with t1 unobservable (3/4)
Page 48
IST / DEEC / API Chap. 9 – Supervised Control of DES
Methods of Synthesis
Example: design controller with t1 unobservable (4/4)
Finally the supervised controller is simply obtained from La and ba:
Dc L a D p
1 1 0
2 0 1
1 0 1
0 2 1 2 1 1
0 1 1
0 1 1
c 0 ba La p 0
1
1 2 0 1
1
1 0 2 1 0 Obtained the desired result:
1
supervisor does not touch t1 .
1 Page 49
IST / DEEC / API
Page 50
IST / DEEC / API
What
is
next ?
Page 51
IST / DEEC / API
4. Software (Software re-usability -- cut and paste, Sophisticated software for logic control,
User-unfriendly software)
3. Theory/Practice Gap (Bridging the gap between industry and academia,
Gap between commercial software and academic research)
2. Education (Educating students for various PLCs, Education and keeping current with
evolution of new control technologies, Education of engineers in logic control,
Lack of curriculum in discrete-event systems)
And the number one challenge in logic control for manufacturing systems is...
1. Diagnostics (Integrating diagnostic tools in logic control, Standardized methodologies for design,
development, and implementation of diagnostics)
Page 52
IST / DEEC / API Chap. 9 – Supervised Control of DES
The End .
Page 53