Abordagem RW - PowerPoint PPT Presentation

1 / 76
About This Presentation
Title:

Abordagem RW

Description:

related with the logical behavior of the DES (possible state/event sequences) ... State Agregation in Automata. Definition: Let (S,X,f,xo,F) be afinite state ... – PowerPoint PPT presentation

Number of Views:90
Avg rating:3.0/5.0
Slides: 77
Provided by: rafaelsan
Category:

less

Transcript and Presenter's Notes

Title: Abordagem RW


1
LOGICAL CONTROL OF DISCRETE EVENT SYSTEMS
AN AUTOMATA BASED APPROACH
Jose Eduardo R Cury
2
OUTLINE -Preliminaires -Basic Control
Theory -Extensions Modular Control
Partial Observation
Hierarchical Control
3
1.Preliminaires
Approach introduced by
Ramadge and Wonham (1984)
logical model related with the logical behavior
of the DES (possible state/event
sequences)
timed and untimed versions
DES are modelled as generators of
formal languages
synthesis-based
limitations computational complexity
4
Languages
S set of symbols alphabet
Definition A language L, defined over
an alphabet S, is a set of strings of symbols in S
Example Sa,b,g L1e,a,abb L2All
possible strings of lenght 3
and beginning with a L3All possible finite
lenght strings and beginning with a
5
Regular Expressions
  • Concatenation of strings

u abb v gb conc. uv abbgb
  • Operations on Languages
  • Let A and B be 2 languages. We have
  • a) Concatenation
  • AB w wuv, u Î A, v Î B
  • b) Kleene closure
  • A ÈAn where A0 e
  • An An-1A
  • c) Usual operations over sets

µ
n0
6
Example S a,b,g L1 e,a,abb L2 g
Then L1L2 g,ag,abbg
L1 e,a,abb,aa,aabb,abba,abbabb,... L2
e,g,gg,ggg,...
L1 È L2 L1 L2 e,a,abb,g
7
Notation if u and v are strings u u (uv)
u,vu È v u e,u,uu,uuu,... uv uv
Definition (Regular Expressions) 1) Æ is a
regular expression denoting the empty
language), e is a regular expression
denoting e, s is a regular expression
denoting s, " sÎS 2) If r and s are
regular expressions, then rs, r, s, (rs)
are regular expressions 3) All regular
expressions are obtained by applying rules 1
and 2 a finite number of times
8
Example Let S a,b,g be an alphabet
then (ab)g a,b,ag,bg,agg,bgg,aggg,bggg,...
(ab) g e,g,ab,abab,ababab,...
Definition A regular language is any language
which can be represented by a regular expression
Proposition If L u1, u2,...,un is a finite
language, then L is a regular language
9
Prefix of a string u Î S is a prefix of v Î S
if for some w Î S, v uw
10
Finite State Automata
Device which accepts a Language according to
specific rules.
Definition A finite state automaton is a 5-tuple
(S,X,f,x0,F) where S is a finite alphabet X
is a set of finite states f is a state
transition function, f X S X x0 is an
initial state, x0 Î X F is a set of marked
states, F Í X
11
Transition State Diagrams
Directed graphs where the nodes represent states
and the labeled edges represent state transitions
Example (S,X,f,x0,F) S a,b,g X
x,y,z f(x,a) x, f(x,b) f(x,g) z, f(y,a)
x, f(y,b) f(y,g) y, f(z,b) z, f(z,a)
f(z,g) y,
g
b
12
Language accepted by an automaton
Extended transition function
f X S X
f(x,us) f(f(x,u),s) u Î S , s Î S
In the above example f(x,bba) f(f(x,bb),a)
f(f(f(x,b),b,a) f(f(z,b),a) f(z,a) y
Definition A string u is accepted by a finite
state automaton (S,X,f,xo,F), if f(xo,u) x,
with x Î F
13
Definition The language accepted by a finite
state automaton (S,X,f,xo,F) is the set of
finite strings uf(xo,u) Î F. If the automaton
is denoted by A, then the language accepted by A
é denoted L(A).
Example Let S a1,a2,b be an alphabet. Define
a task as a sequence of 3 events beginning with
b, followed by a1or a2, and then b, followed by
an arbitrary sequence.
Corresponding language
L b(a1a2)b(a1a2b)
14
Non-Deterministic Finite State Automata
Definition A Non-Deterministic Finite State is
a 5-tuple (S,X,f,xo,F) with S,X,xo,F as
before, and f a transition state function f X
S 2X
Example
a
f(0,a) 0,1 f(0,b) Æ f(1,a) Æ f(1,b)
0
It allows for the expression of
incomplete knowledge of the system and for the
expression of the physically admissible set of
events which follows a state x.
15
Language accepted by a non-deterministic
automaton
Extended transition function
f(x,us) z z Î f(y,s) para algum estado y
Î f(x,s)
u Î S , s Î S
Definition The language accepted by a
non- deterministic finite state automaton
(S,X,f,xo,F) is the set of finite strings
uf(xo,u) Ç F ¹ Æ.
Proposition If L is the language accepted
by some non-deterministic finite state automaton
thhen there exists a deterministic finite state
automaton which accepts L.
16
Example Let (S,X,f,xo,F) be the automaton of the
last example. Let us build a deterministic
automaton (SD,XD,fD,xoD,FD) which accepts the
same language
SD E
xoD xo 0 FD 0,01
a
a
Æ
b
b
a
b
1
0
a
b
a
01
17
Equivalence between Finite State Automata and
Regular Expressions
Theorem (Kleene, 1950) If a language is regular,
then it can be accepted by some finite state
automaton and if a language is accepted by a
finite state automaton , then it is a regular
language.
Example of a non-regular language L e, ab,
aabb, aaabbb, ... denoting an aaa...aa we
have Lan bn , n 0, 1, 2, ...
18
State Agregation in Automata
In general the number of states in an automaton
is not minimal
Minimization equals Identification of equivalent
states
Definition Let (S,X,f,xo,F) be afinite
state automaton and R Í X. R is said to be
formed by equivalent states if, for any pair x,y
Î R, x ¹ y, and any u Î S
f(x,u) Î F if and only if f(y,u) Î F
19
Observações
a) se x Î F e y Ï F então x e y não podem ser
equivalentes.
b) se f(x,e) f(y,e) para qualquer e Î E (ex-
ceto e) então x e y são equivalentes.
c) a propriedade acima se mantém se, para
alguns eventos, f(x,e)y e f(y,e)x.
d) em geral, se R é tal que R Í F ou R Ç F
Æ, então R é constituído de esta- dos
equivalentes se f(x,e) z Ï R implica que
f(y,e) z, para quaisquer x,y ÎR.
e) se F X então todos os estados são equi-
valentes em relação a F.
20
Example Detector of the 1,2,3 sequence.
1
2
3
x1
x12
x123
1
3
2
1
2
3
xo
3
2
21
Algoritmo para a Identificação de Estados
Equivalentes
1) Marcar (x,y) para todo x Î F, y Ï F
2) Para todo par (x,y) não marcado em 1)
2.1) Se (f(x,e),f(y,e)) está marcado para algum
e Î E então
2.1.1) Marcar (x,y) 2.1.2) Marcar todos os pares
não-mar cados (w,z) na lista de (x,y). Repetir
para cada (w,z) até que nenhuma marcação seja
possível
2.2) Se (f(x,e),f(y,e)) não está marcado para
nenhum e Î E então
2.2.1) Se f(x,e) ¹ f(y,e), então acres- centar
(x,y) à lista de (f(x,e),f(y,e))
22
Generators
Definition A Generator is a 5-tuple G (S, X,
f, xo, F) where S , X, xo, F are defined as for
the automata and f is a partial function f X S
X , defined only for some elements of X S
(notation f(x,s)!).
Definition fits with the fact that in
systems some transitions are not physically
admissible
Notation S(x) Í S set of admissible events
after x Î X
23
Language Generated by G
L(G) u Î E / f(xo,u)!
Marked Language of G
Lm(G) u Î E / f(xo,u) Î F)
  • Properties
  • L(G) is prefix-closed
  • An automaton A is a generator with
  • L(A) S
  • Lm(G) Í L(G)

24
Example Three state machine
S s, f, b, r
L(G) (sf sbr)(e s sb) represents the
set of all physically admissible sequences in the
system.
Lm(G) (sf sbr) represents the set of all
completed tasks possible to occur in the system.
25
Accessibility and Co-accessibility of a Generator
Accessible state A state x Î X is accessible if
x f(xo,u) for some u Î S.
Accessible Generator A generator is
accessible if every x Î X is a reachable state.
Accessible Component of G Gac (Xac, S, fac,
xo, Fac) where Xac set of accessible states
of G Fac Xr Ç F fac f/ S Xac If G is
accessible then Gac G
26
Co-accessible Generator (non-blocking) A
generator is co-accessible (non-blocking) if any
u Î L(G) can be completed into a string in Lm(G).
If u Î L(G), then w Î S / uw Î Lm(G)
Trim Generator A generator is trim if it
is accessible and co-accessible.
Example
x4 non accessible state x5 non co-accessible
state (blocking state)
27
Gac accessible component of G
g
a
xo
x1
x3
a
a
b
x2
x5
g
Gt Trim generator
28
Composing Generators
Synchronous and Shuffle Product
Natural Projection Let S and Si be sets of
events with Si Ì S. The natural projection Pi
S S i is defined as
Pi(e) e
e if sÏ S i
Pi(s)
s if sÎ S i
Pi(u s) Pi(u) Pi(s) onde u Î S s Î S
The action of Pi over a string corresponds
to deleting events not in Ei.
29
Extending natural projections to languages
PiL Li ui Î Si / ui Piu for some u Î L
Inverse Projection
Pi-1Li u Î S / Piu Î Li
Synchronous Produt Let L1 Í S1 e L2 Í S2 (with
possibly S1 Ç S 2 ¹ Æ). Let S S1 È S2.
The synchronous produt L1 //s L2 Í S is defined
as
L1 //s L2 P1-1L1 Ç P2-1L2
Observe that u Î L1 //s L2 if and only if P1(u) Î
L1 and P2(u) Î L2
30
The synchronous product represents a
language generated by a generator which is the
result of the joint action of two other
generators
Example S1 a, b S2 b, g
G G1 // G2
g
L(G) L(G1) //s L(G)2
31
Intersection of languages Corresponds to the
synchronous product with S1 S2 since in this
case Pi-1Li Li
Example
b
b
L1 (a b) E
L1 //s L2 L2
32
Shuffle Product
The Shuffle Product of two languages L1 and L2 is
the language consisting of all possible
interleavings of strings of L1 and L2
Language generated by a generator which is the
result of the independent or asynchronous action
of two other generators
33
Example Two independent and assynchronous users
of the same resource
I idle R requiring the resource U using
the resource
Assynchronous Composition
G G1 // G2
States (x,y), x Î G1, y Î G2
Transitions (x,y) (x,y) or (x,y) (x,y)
34
g1
a1
b1
R1I2
U1I2
I1I2
a2
a2
a2
g1
g2
g2
I1R2
R1R2
U1R2
a1
b1
g2
b2
b2
b2
b1
a1
U1U2
R1U2
I1U2
g1
L(G) all strings over E1 È E2 which correspond
to paths in the graph starting in I1I2
Lm(G) Idem, but ending in I1I2
G is co-accessible Lm(G) L(G)
35
2. Basic Control Theory
. The Control - Some events can be disabled by an
external controller - Events to be
disabled depend on the past behavior of the DES
. Methodology 1. Modeling the OPEN LOOP
BEHAVIOR 2. Modeling the SPECIFICATIONS Safety,
Liveness, Fairness 3. Synthesizing the OPTIMAL
CONTROL LAW
. Limitations - DES, SPEC., CONTROLLERS finite
state machines - Algorithms often polynomials in
the number of states of DES, which grows
exponentially with the number of components
36
Control of DES
Central Idea
  • Control action
  • some events can be externally disabled
  • Measured variables
  • current state or sequence of past events

37
Methodology
1) Specification of the Open-loop behavior.
2) Specification for the Closed-loop behavior.
  • Typical specifications
  • Safeness
  • Liveness
  • Fairness

3) Synthesis of the control law
satisfaction of specifications in a
least restrictive way
38
Some characteristics of the approach
  • The three steps are performed systematically
  • (including automatic synthesis)
  • Plant, closed-loop specifications, and
    controller
  • must
  • be modeled by finite state generators.
  • Computational complexity
  • polynomial in the number of states
  • number of states grows exponentially with
  • the number of sub-systems.
  • research issue

39
Control Structure
Partition of S
S Sc È Su
Sc set of controllable events
can be disabled
Su set of uncontrollable events
can not be disabled
Control input
Subset g Ì S tal que
If s Î g then it is allowed by g,
otherwise s is disabled by g.
Su Ì g (uncontrollable events
can not be disabled)
Set of possible control inputs G Ì 2S
40
DES with control structure Generator G and a
set of control inputs G.
Control is permissive
It doesnt force but just enables or disables
events
Events are generated by the plant
Example Three states machine.
Scs, r
Suf, b
G g1, g2, g3, g4
g1 s, f, r, b g2 s, f, b g3 r, f,
b g4 f, b
41
Supervisor
Controller which switches the control inputs g,
g, g,... as a function of the
measured sequence of events.
Formally, a function
h L G
which associates to each possible string w Î L a
control input g h(w) Î G
System under supervision
After generating w,
next event is an element of
h(w) Ç S(f(xo,w))
42
Closed-loop behavior
Notation
h/G G under supervision of h
(closed-loop system)
Closed-loop generated behavior
The closed-loop behavior of h/G is defined by
the language L(h/G) Ì L(G)
  • e Î L(h/G)
  • ws Î L(h/G) if and only if
  • w Î L(h/G), ws Î L(G), s Î h(w)

43
Closed-loop marked behavior
Lm(h/G) L(h/G) Ç Lm(G)
Lm(h/G) is the part of Lm(G) which survives under
supervision.
It may represent the set of tasks which can be
performed under supervision.
Property
Æ Í Lm(h/G) Í Lm(G)
Definition h is nonblocking for G if
every generated sequence of events can be
completed into a marked sequence
44
State realization of h
Let h be a supervisor defined for G
(S,X,f,xo,F) hL G
Let T be an automaton (S,Y,g,yo,Y)
Let F be a complete function from Y to G F
Y G
45
In words, h(w) can be obtained by
i. applying w to the automaton T, leading it
to the state y. ii. applying g F(y) such that
F(y) h(w) .
The automaton T has its transitions driven by the
events in G
46
Realization by a Generator S
Representation of the supervisor by a generator S
control action over G implicit in the transition
structure of S.
  • If w Î L(h/G) then
  • w Î L(S),
  • ws Î L(S) only if s Î h(w) or
  • ?? ?
    L(G)
  • If w Î L(h/G), ws Î L(G), s Î h(w)
  • then ws Î L(S)

In words
  • transitions disabled by h and
  • physically possible, dont appear in the
  • transition structure of S.
  • transitions enabled by h, and physically
    possible,
  • must appear in the transition structure of S.

47
  • S is the generator
  • (S,Y,g,yo,Y)
  • transitions
  • driven by events occured in G in accord to g
  • control action
  • once in the state y S disables events ? ?
    L(G),
  • such that s Ï S(y)

h(w) Ç S(f(xo,w)) Í S(g(yo,w)) Ç S(f(xo,w)) Í
h(w)
48
Closed-loop behavior
The behavior of h/G can be represented by the
generator corresponding to the composition of S
and G (S // G)
h/G S // G S, Y X, q, (yo, xo), Y F
where q((y,x),e) (g(y,e),f(x,e)) if
g(y,e)! e f(x,e)!
In the composition S // G only transitions
enabled in both generators can occur. If the
supervisor disables a transition, it
doesnt occur.
49
Example Dinner of two philosophers
G G1 // G2
Sc e1, e2
Su m1, m2
Control specification avoid state EE
50
Let a supervisor be defined by
In this case it is easy to see that
L(h/G) ((e1m1)(e2m2))(e e1 e2)
Lm(h/G) ((e1m1)(e2m2))
and the control specification is attained.
51
Realization by (T,F)
Automaton T
F(yo) e1, e2, m1, m2 F(y1) e1, m1, m2
h((e1m1)(e2m2))e1 F(y2) e2, m1, m2
h((e1m1)(e2m2))e2
irrelevants
52
Closed-loop system
g Î G
sÎ S
MM
e1
m2
m1
e2
EM
ME
m1
m2
e2
e1
EE
m1 m2
yo
e1
m2
e2
m1
y1
y2
e1 e2 m1
e1 e2 m2
53
Realization by a generator S
S
Obs. L(S) L(h/G)
Closed-loop system composition of S and G
S // G
L(S//G) L(h/G) Lm(S//G) Lm(h/G)
54
  • Some questions
  • Some specifications could not be exactly
  • attained
  • Which are the conditions for a specification to
  • be exactly attained ?
  • If there exist several incomplet solutions
  • which one is the best ?
  • (in the ex., if F(yo) m1, m2 specification is
    attained,
  • but the philosophers will eventually die)
  • Are there other ways to express specifications
  • than just by forbidden states?

55
Controllability and Existence of Supervisors
Problem
Given a DES G with generated behavior L(G) and
marked behavior Lm(G)), which closed-loop marked
behaviors K Ì Lm are possible to be obtained by
the action of a nonblocking supervisor ?
Equivalently, What are the conditions on K Ì
Lm under which there exists h such that
Lm(h/G) K ?
56
Illustration Dinner of philosophers
with sake
Gi (i 1,2)
Sc e1, e2
57
Control Specification avoid state DD
58
Control Specification
G
MM
e1
e2
m1
m2
ME
EM
m1
m2
d1
d2
f1
e2
f2
e1
EE
DM
MD
f1
e2
f2
e1
d1
d2
m1
m2
ED
DE
One must find h such that
L(h/G) L(G) or Lm(h/G) Lm(G)
Impossible observe that e1d1e2 leads to a state
where it is impossible to prevent the occurrence
of d2
59
Controllability
A language K Í S is said to be controlable with
relation to a language L if
In words, controlability of K implies that
any prefix w of a string in K, when followed by
an uncontrollable event s such that ws Î L,
must remain being a prefix of K (ws Î K)
Systemic Interpretation
If L represents the generated behavior of a DES
G, K is controllable if and only if no sequences
in G which are prefixes of K, when followed by
uncontrollable events in G exit the prefixes of
K
Obs. Æ, L(G) e S are controllable w.r.t. L(G)
60
Example
2
c
b
a
G
0
1
d
e
3
L(G) (abc ade) (e a ab ad)
If K (abc) ab
If Su a, b, c, d, e and Sc then K is
not controllable w.r.t. L(G)
If Su a, b, c, e and Ec d then K is
controllable w.r.t. L(G)
61
Example
G
L(G) (sf sbr)(e s sb)
62
No exemplo do almoço dos filósofos, tanto
L(S//sG) como Lm(S//sG) são con- troláveis em
relação a L(G).
No exemplo do almoço dos filósofos com vinho,
tanto L(G) como Lm(G) não são controláveis em
relação a L(G).
63
Objectives of Supervision
Given a specification K Í Lm(G) which represents
the tasks we want to be completed under
supervision, find (if possible) a nonblocking
supervisor h such that the closed loop behavior
satisfies
Lm(h/G) K
64
L - closure
Def. Let K and L be languages with K Ì L Í S.
K is said to be closed w.r.t L or L-closed if
i.e., K is L-closed if every one of its prefixes
that belong to L, are also contained in K.
Example
G
Lm(G) ab, ablm, alam
65
(No Transcript)
66
Existence of Supervisors
Proposition Given a generator G, with marked
language Lm(G), and a specification K Í Lm(G), K
¹ Æ, there exists a nonblocking supervisor h,
such that Lm(h/G) K
if and only if
K is Lm- closed and L- controllable.
67
Example
Eu a, c, e Ec b, d
L(G) (abc ade)(e a ab ad) Lm(G)
(abc ade)(ab ad)
G is trim (thus open-loop nonblocking) (Lm L)
K (abcade)(ab abcad) Ì Lm(G)
Thus there exists a nonblocking h, such
that Lm(h/G) K
68
Supervisor synthesis
A possible solution is S with L(S) K
S
which represents any supervisor h of the form
Not the solution with minimal number of states.
69
Another solution is
where L(S) (d e)a (b c)ae (d e)
(d e)a (d e)a (b c) and L(S)
//s L(G) L(S) Ç L(G) K
The above DES is a representation of
70
Supremal Controllable Sub-language (Least
restrictrif (optimal) supervisor)
Controllability is necessary for the existence
of supervisors
Question What to do if K is not controllable ?
We will show that there exists a unique
best approximation of K, the supremal
controllable language contained in K (notation
sup C (K))
Under certain conditions this language
satisfies also the closure conditions which
guaranties the existence of a supervisor. Such
supervisor is the least restrictive or optimal
supervisor.
71
Existence of the supremal controllable sublanguage
of K
Let L(G) (generated by a DES G) and K Í S
(closed-loop specification).
Proposition C(K) is non-empty and closed under
the operation of union. In particular, C(K)
contains a unique supremal element denoted sup
C(K).
72
Obs. The above supervisor induces a
behavior within the specifications given by K in
the least possible restrictive way. In this sense
it is optimal.
73
Synthesis of supC(K)
Let K a regular language G a DES with
behaviors L(G) and Lm(G) S a trim generator with
Lm(S) KÌ Lm(G)
Algorithm 1 1) Compute Co G // S make i0
(Observe that Lm(Co) Lm(G) Ç Lm(S)
K) 2) Identify the bad states in Ci states
(x,y) s. t. Su(G)(x) Ë Su(Ci)(x,y) 3) Obtain
Ci by eliminating the bad states in Ci and
their associated transitions. Make Ci1 trim
Ci 4) If Ci1 Ci , stop since sup C(K)
Lm(Ci) otherwise make i i1 and go to
step 2.
74
Algorithm 2 1) as in the above algorithm 2)
Identify bad states in Ci as in 2 of the above
algorithm. If there is no bad states, go to
6 3) Build Ci by deleting all transitions
which correspond to controllable events in
Ci 4) Determine other bad states, as those
which have paths in Ci leading to at least
an already identified bad state 5) Modify
Ci, by deletingthe bad states identified in
steps 3 e 5, and corresponding transitions
make Ci1 trim Ci 6) If Ci1 Ci , stop
since sup C(K) Lm(Ci) otherwise make i
i1 and go to 2.
75
Example
G
S
Lm(S) L(S) K
76
Example
G
Su b,g
K a1 a1bbb(e b) a2g
S
sup C(K) a2g
Write a Comment
User Comments (0)
About PowerShow.com