Supervisory Control for Robot Coordination Something about what we do at Outline Sweden, Göteborg, Chalmers Where, What, When? Depend on us Robot Coordination Police and Chiefs Supremica The Supremal Tool? Visit at Politecnico di Milano, May 2007 1 2 Sweden Where is it? What is it? Sweden + Italy = true? Sweden Ultima Thule Ultimate north 449 964 square km (Italy 301 277 ) 9 million people (Italy 57 million) Swedish companies IKEA, H&M ABB Volvo (Ford) Saab (GM) Ericsson (Sony) Government Figurehead king Right wing government Yes! Football! Zlatan Ibrahimovic Inter Nacka Skoglund Glenn Strömberg Atalanta Gunnar Gren Il Professore From Göteborg AC Milan Gunnar Nordahl Nils Liedholm Gre-No-Li 3 4
Göteborg Where is it? Chalmers University of Technology Göteborg Göteborg Gothenburg Port town 14th largest in Europe 64th largest in the world Second biggest city in Sweden 500 000 people (Milano 1.3M) Founded in 1621 Dutch built canal Scotsmen, English, German immigrants Swedish East-Indian Trading Company Swedish goods traded in Cadiz Silver taken to East-India Tea, china, herbs, silk etc Many Scotsmen involved Among them William Chalmers 5 Chalmers University One of four main technical universities Financially (2005) 2150 MSEK (~220 M ) 1435 MSEK research 723 MSEK education People (2005) 2355 employees 10300 students 1062 PhD students (28% female) 337 examined graduates 179 PhD 158 Licentiate 1994 Private Non-governmental university Foundation owned 6 Who are we? Research Overview and others Spin-off from Control Engineering Since 1998 Three senior researchers 10 in-house PhD students 6 out-house Belong to Dept Collaborators - Funding Volvo ABB SSF, ProViking Vinnova, VR Wingqvist Laboratory 7 Reference architectures Structure and design Functionality and interactions Information reuse Simulation Flow simulation Geometry simulation Off-line programming Formal methods Modeling Finite automata Supervisor synthesis and verification Optimization Code generation and execution Virtual Factory 8
Robot Cells Chemical Batch Processes Multiple robots Concurrently working Confined workspace Automotive industry Welding robots Material handling Packaging industry Pick and place Material handling We do not consider Servo control Axes movements, trajectories Degrees of freedom Coordinate systems calculations Multi Purpose Batch Plants Highly flexible production system Versatile production resources Product-specific use of resources, operations Large product flora Frequently changing Each product distinct processing sequence Sequences of operations Described by recipes Safety critical 9 10 Embedded Systems Outline Complex logic Requirements, constraints What (not) to do when Functionality Implemented in software Integrating many components Central locking, alarm, Embedded control system Reactive systems Interact with their environment Safety critical Must work correctly Sweden, Göteborg, Chalmers Where, What, When? Depend on us Robot Cell Coordination Police and Chiefs Supremica The Supremal Tool? 11 12
Robot Cell Automotive Industry Robot Cell Program Line consisting of Cells Car body Multiple robots Working on a single product Welding Material handling Confined workspace Specific work cycle Each robot has its own schedule A sequence of operations to carry out Each operation performed once Constraints Interlocks, safety constraints 13 ;Program reversed 29/07/29 by pc54464 ctime (TRUE ) O_HOMEPOS=FALSE P26lSegment1 ( ) WAIT FOR I_BODY_OK==TRUE O_OUT_BDY_LF=FALSE WAIT FOR I_INTLOCK_3 ; 3737_3 O_INTLOCK_3=FALSE ; to 3737_3 WAIT FOR I_INTLOCK_3 ; 3737_3 P26lSegment2 ( ) WAIT FOR I_INTLOCK_1 ; 3735 O_INTLOCK_1=FALSE ; to 3735 WAIT FOR I_INTLOCK_1 ; 3735 P26lSegment3 ( ) O_INTLOCK_3=TRUE ; to 3737_3 P26lSegment4 ( ) O_INTLOCK_1=TRUE ; to 3535 WAIT FOR I_INTLOCK_5 ; 3737_5 O_INTLOCK_5=FALSE WAIT FOR I_INTLOCK_5 ; 3737_5 P26lSegment5 ( ) O_INTLOCK_5=TRUE ; to 3537_5 O_OUT_BDY_LF=TRUE O_HOMEPOS=TRUE ctime (FALSE ) END Operations In sequence Interlocks Waiting for interlocks Reserving interlocks Releasing interlocks With multiple robots Running concurrently Need to coordinate interlocks Must guarantee Mutual exclusion Never two reserving same interlock Non-blocking Two or more never wait for each other forever 14 Robot Cell - Model Leave home position Home pos Discrete Event System Modeling ;Program reversed 29/07/29 by pc54464 ctime (TRUE ) O_HOMEPOS=FALSE P26lSegment1 ( ) WAIT FOR I_BODY_OK==TRUE O_OUT_BDY_LF=FALSE WAIT FOR I_INTLOCK_3 ; 3737_3 O_INTLOCK_3=FALSE ; to 3737_3 WAIT FOR I_INTLOCK_3 ; 3737_3 P26lSegment2 ( ) WAIT FOR I_INTLOCK_1 ; 3735 O_INTLOCK_1=FALSE ; to 3735 WAIT FOR I_INTLOCK_1 ; 3735 P26lSegment3 ( ) O_INTLOCK_3=TRUE ; to 3737_3 P26lSegment4 ( ) O_INTLOCK_1=TRUE ; to 3535 WAIT FOR I_INTLOCK_5 ; 3737_5 O_INTLOCK_5=FALSE WAIT FOR I_INTLOCK_5 ; 3737_5 P26lSegment5 ( ) O_INTLOCK_5=TRUE ; to 3537_5 O_OUT_BDY_LF=TRUE O_HOMEPOS=TRUE ctime (FALSE ) END Segment 1 Body OK? Interlock 3? Segment 2 Interlock 1? Discrete Event System DES Segment 3 Release IL 3? Release IL 1? Segment 4 Interlock 5? Segment 5 Release IL 5? Body OK Interlock 3 Interlock 1 Interlock 5 15 DES modeling Process algebra Petri nets Formal languages Finite state machines - Automata States Events Transitions associated with events Expresses regular languages Sequences of events Interaction Synchronous composition A B 16
Robot Cell Coordination Problem Need a traffic cop Coordinates resource usage Restricts access Non-blocking Useful work always possible Controllable Uncontrollable choices considered Optimality Restrict as little as possible We call such a cop A supervisor Safety critical systems Must work correctly And why would this be hard? Combinatorial explosion 7 robots that can do n things each 2 7 = 128 combinations 3 7 = 2187 combinations In practice less, but many Exhaustive testing Practically impossible Blocking may occur What is allowed now, can cause problems later Later can be far later 17 18 And why would this be hard? Example Valve battery Collection of valves Flexible routing Operator commands From this to that... Automatic Manual testing of controller program Process simulation 2 persons 3 shift 8 full weeks 48 8-hour weeks, a full person-year! 700 logical errors... Detected! How many undetected? 19 Robot Studio 3D simulation environment ABB robots Same software as in robot controller Accurate simulation Two robots Each with three targets I1 A C B I1 I2 B C A I2 Robots must not collide Not at the same target simultaneously Robots must not block Not wait for each other forever 20
Sweep volumes Span of robot motions Generated by simulation tool Time consuming Intersect the volumes Generates zones Matches critical need Home I1A1!B1I1_finish Wait1 C1B1 Wait3 A1C1 Wait2!C1B1_finish!A1C1_finish C1B1_start Free Booked!B1I1_finish!A2I2_finish Model the zones Finite automata One for each zone Reserving, releasing (booking, unbooking) Model the robot paths Finite automata One for each robot Sequence of zone use Waiting Reserving Releasing Automatic Collisions with the zones B1I1_start 21 B1I1 22!A2I2_finish!B1I1_finish C1B1_start!C1B1_finish B1I1_start!A1C1_finish!A1C1_finish!A1C1_finish A2I2_start Generate model of total system Synchronous composition Analyze system Blocking (deadlock) States that only lead to blocking B2C2_start B2C2_start B2C2_start!B2C2_finish!B2C2_finish!B2C2_finish!C2A2_finish C2A2_start 23 B2C2_start!A2I2_finish!B2C2_finish C2A2_start!C2A2_finish A2I2_start!B1I1_finish!A1C1_finish C1B1_start!C1B1_finish B1I1_start Result All sequences of allowed zone reservations Supervisor - Traffic cop Only prohibits bad things Only allows good things Allows all allowable things Maximally permissive Running according to the cop Guarantees always possible to finish all work No collisions Given accurate time estimates Could calculate time schedule Best way to run A* algorithm Software exists 24
Outline Supremica A Useful Tool Sweden, Göteborg, Chalmers Where, What, When? Depend on us Robot Coordination Police and Chiefs Supremica The Supremal Tool? A platform for the formalism Modeling Verification Synthesis Simulation Optimization Automatic implementation Execution, Soft PLC Master Thesis work Luisa Losito Emanuela Calò Domenico Spensieri Anton & Andreas 25 www.supremica.org 26 BoxSweeper Plugin to RobotStudio We re done! 27 28
Supervisory Control for Robot Coordination Something about what we do at Grazie per la vostra attenzione 29