Aula 04 MP260
description
Transcript of Aula 04 MP260
1
Profa. Emília Villani
Lesson 4 – Automata and the Design of Supervisory
Systems
MP 260 – Modelling and Analysis of Discrete Event Dynamic Systems
3
✹ Control system that imposes the specified behaviour on the plant by enabling the occurrence of certain events:
✹ The supervisory system observe the occurrence of events on the plant and define the enabled events.
✹ Specification: set of restrictions that the system should obey (ex.: the robot can only pick up the part from the buffer if the destination is free).
Supervisory System1. Control of DEDS
Observed events
Plant
Supervisory system
Enabled events
4
✹ The plant is modelled as an automaton G, with an alphabet Σ.
✹ The supervisory system is modelled as an automaton S defined over the same alphabet Σ.
✹ The behaviour of the controlled system is S/G:
Supervisory System and Automata1. Control of DEDS
Observed events
Plant
Supervisory system
Enabled events
Lg(S/G) = Lg(S||G)Lm(S/G) = Lm(S||G)
5
✹ Controllable events - Σc:▪ Events of the plant that can be inhibited by the
control system.
✹ Uncontrollable events - Σu:▪ Events of the plant that cannot be inhibited by
the control system.
✹ Properties: ▪ Σ = Σu∪ Σc▪ Σu ∩ Σc = ∅
Controllable and Uncontrollable Events
1. Control of DEDS
6
Design of Supervisory Systems
1. Control of DEDS
Step 1 – Modelling the plant
Step 2 – Defining the specification
Step 3 – Synthesis of the supervisory system
7
Step 1 – Modelling the Plant1. Control of DEDS
A. Identify the system components and build the automaton of each component.
B. Use synchronous composition to obtain the global model of the plant (uncontrolled plant).
C. Identify the controllable and uncontrollable events.
✹ Example: system composed of Machine 1 and Machine 2.
E1 F1
a
b
E2 F2
c
d
Machine 1
Machine 2
E1E2 F1E2
a
b
E1F2 F1F2
a
b
d c d cControllable events: a and c.Uncontrollable events: b and d.
Uncontrolled plant
8
Step 2 – Defining the Specification1. Control of DEDS
A. Build an automaton for any restriction.B. Compose the restriction with the plant.C. Delete any non co-accessible states of the controlled plant.
✹ Example: The output from Machine 1 goes to Machine 2. The intermediate buffer has capacity 1.
A Bb
c
E1E2 F1E2a b E1E2
cA A B
E1F2Aa F1F2A
b E1F2Ba F1F2B
F1E2Bd
c
a
dd d
Restriction
Controlled plant
9
Controllability 1. Control of DEDS
✹ Consider the following plant and specification:
▪ What happens when the system is in state 1B?▪ Can the controller forbid the occurrence of the second event b?
A Bb
c
Restriction:
a b d0A 1A 2B 0B a 1B c 3A
eControlled plant:
0 1a
2
3
b
ce
dPlant:
NO!
10
Controllability 1. Control of DEDS
✹ Condition for controllability:
EΣu ∩ Lg(G) ⊆ E
▪ E – Language of the controlled plant resulting from Step 2.
▪ EΣu – Strings from the controlled plant followed by uncontrolled events.
▪ EΣu ∩ Lg(G) – Subset of EΣu that can actually happen in the plant.
▪ EΣu ∩ Lg(G) ⊆ E – All the possible uncontrolled events of EΣu must be in E. The supervisory system cannot inhibit the occurrence of uncontrolled events.
11
✹ Sometimes the solution is not possible...
a b d0A 1A 2B 0B a 1B c 3A
e
✹ Solution:▪ Eliminate from the controlled plant transitions of controlled
events that lead to dangerous states.
0A Resulting trim automaton !!!
Controllability 1. Control of DEDS
12
Step 3 – Synthesis of the Supervisory System
1. Control of DEDS
A. Identify dangerous states and delete controllable transitions that lead to dangerous states.
B. Determine the trim automaton.
✹ Example: system of Machine 1 and 2.
F1E2B
E1E2 F1E2a b E1E2
cA A B
E1F2Aa F1F2A
b E1F2Ba F1F2B
d
c
a
dd d
E1E2 F1E2a b E1E2
cA A B
E1F2A
a F1F2A
b E1F2B
dd d
F1E2B
F1F2B
13
Software IDES2. Introduction to IDES
✹ Download from: https://qshare.queensu.ca/Users01/rudie/www/software.html
✹ Unzip and double clip on IDES3.jar.States: click on ‘Create nodes and edge’ and on drawing área.
Events: write name in the 'Add new event' box and click on 'Add‘.
Transitions: click on the starting node and then on the ending node.
Initial and/or marked states: select the state and click on the right button of the mouse, click on 'initial' and/or 'marked‘.
Add events to transitions: select the transition and click on the right button of the mouse, select 'Label with events‘ and assign events to edge
14
Software IDES2. Introduction to IDES
✹ Step 1 – Modelling the plant▪ Create the automata of Machine 1 and Machine 2.
15
Software IDES2. Introduction to IDES
✹ Step 1 – Modelling the plant▪ Compose the automaton of the plant: menu ‘operations’, ‘DES
operations’.▪ Use ‘sync’ operation.
16
Software IDES2. Introduction to IDES
✹ Step 2 – Defining the specification▪ Compose the automaton of the plant: menu ‘operations’, ‘DES
operations’.▪ Use ‘sync’ operation.
17
Software IDES2. Introduction to IDES
✹ Step 3 – Synthesis of the supervisory system▪ Use ‘supcon’ operation with ‘Plant’ as the plant model and
‘Controlled_plant’ as the specification.
18
Production System3. Exercises
✹ Design the supervisory system
Components and Events
Valve_1:Events: open1, close1
Valve_2:Events: open2, close2
Valve_3:Events: open3, close3
Uncontrollable:close1, close2, close3
19
✹ Step 1 – Modelling the plant
Valve_1
Valve_2
Valve_3
Valve_1+Valve_2+Valve_3
Production System3. Exercises
20
✹ Step 2 – Defining the specification
Restriction_1
Restriction_2
Restriction_3
Controlled_plant
Production System3. Exercises
22
Manufacturing System3. Exercises
Buffer(max 1 part)
Machine(max 1 part)
Robot(max 1 part)
Exit
a – Part arrives at Buffer,b – Robot picks up part from Buffer, c – Robot delivers part to Machined – Robot picks up part from Machinee – Robot delivers part to Exit.
Uncontrollable events:
a, c , d, e
✹ Design the supervisory system
23
Transportation system
Machine 1 Machine 2Exit
AGV
a
Automated Guided Vehicle
b c d e
a – Part enters Machine 1b – AGV picks up part at Machine 1c – AGV delivers part to Machine 2
d – AGV picks up part at Machine 2e – AGV delivers part to exitUncontrollable events: a, c, e
3. Exercises
✹ Design the supervisory system
24
Quality Assurance
✹ Camera detects good and faulty parts at P1. The good ones go to the Machine, faulty ones are rejected.
Track
Reject
P1 P2
Robot
Machine
Part
Camera
a – Part arrives at P1b – Track rotates from P1 to P2c – Robot picks up part at P2d – Robot rejects the part
e – Robot delivers the part to the machinef – Machines delivers the partg – Camera detects faulty parth – Camera detects good partUncontrollable events: g, h, f
3. Exercises
✹ Design the supervisory system