Discrete Event Decision & Control - UTA talks/Xian PN 08.pdf · r J2 J5 J6 R1 R2 R3 Two 1’s in...

52
F.L. Lewis Automation & Robotics Research Institute (ARRI) The University of Texas at Arlington Discrete Event Decision & Control Petri Nets in Agile Automation Mengchu Zhou & Zhiwu Li

Transcript of Discrete Event Decision & Control - UTA talks/Xian PN 08.pdf · r J2 J5 J6 R1 R2 R3 Two 1’s in...

  • F.L. LewisAutomation & Robotics Research Institute (ARRI)

    The University of Texas at Arlington

    Discrete Event Decision & Control

    Petri Nets in Agile AutomationMengchu Zhou & Zhiwu Li

  • Automation & Robotics Research Institute (ARRI)The University of Texas at Arlington

    F.L. Lewis, Fellow IEEE, Fellow IFACMoncrief-O’Donnell Endowed ChairHead, Controls and Sensors Group

    http://ARRI.uta.edu/acs

    Discrete Event Decision & Control

  • Springer-Verlag 2006

  • ARRI Intelligent Material Handling (IMH) Cell3 robots, 3 conveyors, two part paths

    EXAMPLE

  • Layout of the IMH Cell

    X5

    X2X8

    X4

    X6

    X7

    X3

    X9X1

    R1

    R3 R2

    M2 M1

    B3

    B2

    B1 A B A B

    IBM robot

    PUMA robotADEPT robot

    Conveyorbidirectional Conveyorunidirectional

    conveyor

    machinemachine

  • Reentrant Flow Line PART B OUT PART A OUT PART A PART B

    CRS

    ROBOT 1

    ROBOT 2

    ROBOT 3

    Machine 1

    Machine 2

    A(1)R1

    A(2)R1 B(1)R1

    B(2)R1

    A(1)R2

    A(2)R2

    B(1)R2

    B(1)R3

    B(2)R3 A(1)R3

    PUMA

    ADEPT

    Routing and Dispatching Decisions are Needed

  • Wireless Sensor NetworksARRI Distributed Intelligence & Autonomy Lab- DIAL

    UnattendedGroundSensors

    SmallmobileSensor-Dan Popa

    Testbed containing MICA2 network (circle), Cricket network (triangle), Sentry robots, Garcia Robots & ARRI-bots

    Dan Popa

  • Programmable MissionsMission Programming and Execution

    Mission Programming for Distributed Networks

    R1

    R2

    R3

    UGS1

    UGS2

    UGS3

    UGS4

    UGS5

    Deploy & Program

  • Mission1-Task sequence

    Mission 1 completedy1output

    S2 takes measurementS2m1Task 11

    R1 takes measurementR1m1Task 10

    R1 deploys UGS2R1dS21Task 9

    R2 takes measurementR2m1Task 8

    R1 gores to UGS1R1gS11Task 7

    R1 listens for interruptsR1lis1Task 6

    R1 retrieves UGS2R1rS21Task 5

    R2 goes to location AR2gA1Task 4

    R1 goes to UGS2R1gS21Task 3

    UGS5 takes measurementS5m1Task 2

    UGS4 takes measurementS4m1Task 1

    UGS1 launches chemical alertu1Input 1

    Descriptionnotationmission1

    Mission 2-Task sequence

    Mission 2 completedy2output

    R1 docks the chargerR1dC2Task 5

    UGS3 takes measurementS3m2Task 4

    R1 charges UGS3R1cS32Task 3

    R1 goes to UGS3R1g S32Task 2

    UGS1 takes measurementS1m2Task 1

    UGS3 batteries are lowu2input

    DescriptionnotationMission2

    Fast Programming of Missions

  • WSN is also a Reentrant Flow Line!

    PART B OUT PART A OUT PART A PART B

    CRS

    ROBOT 1

    ROBOT 2

    ROBOT 3

    Machine 1

    Machine 2

    A(1)R1

    A(2)R1 B(1)R1

    B(2)R1

    A(1)R2

    A(2)R2

    B(1)R2

    B(1)R3

    B(2)R3 A(1)R3

    PUMA

    ADEPT

    Target/Event/ UGS/

    UGS/

    UGS/

    Target/Event/

    Routing and Dispatching Decisions are Needed

  • Discrete Event Supervisory Control

    Objective:Develop new DE control algorithms for decision-

    making, supervision, & resource assignment

    Apply to manufacturing workcell control, C&C systems, & inetworked systems

    • Patent on Discrete Event Supervisory Controller • New DE Control Algorithms based on Matrices• Implemented on Intelligent Robotic Workcell• Implemented on Wireless Sensor Networks• Internet- Remote Site Control and Monitoring

    USA/Mexico Internetworked Control

    Man/Machine User Interface

    TexasTexas

    Intelligent Robot Workcell

    Fast programming of multiple missionsReal-time event responseDynamic assignment of shared resources

  • Discrete event controller

    T asksco m p le ted v c

    R u le-b ased rea l tim e con tro lle r

    Cu curv uFuFrFvFx ⊗⊕⊗⊕⊗⊕⊗=

    Job s ta rt lo g ic

    R esource re lease lo g ic

    W ireless Sensor

    N etw o rk

    . . .

    u c

    Se nsor ou tp ut u

    R esourcere leased rc

    S tart tasks v s

    S tart reso urcere lease rs

    O utp ut yM iss io n co m p le ted

    P la nt co m m a nds P la nt s ta tus

    D isp atch in g ru le s

    C o ntro ller state m o nito ring lo g ic

    xSv VS ⊗=

    xSr rS ⊗=

    xSy y ⊗= T ask co m p le te lo g ic

    User interface:mission planning,

    resource allocation, priority rules

    Sensor readings

    events

    commands

    Decision-making

  • Discrete event controller

    T asksco m p le ted v c

    R u le-b ased rea l tim e con tro lle r

    Cu curv uFuFrFvFx ⊗⊕⊗⊕⊗⊕⊗=

    Job s ta rt lo g ic

    R esource re lease lo g ic

    W ireless Sensor

    N etw o rk

    . . .

    u c

    Se nsor ou tp ut u

    R esourcere leased rc

    S tart tasks v s

    S tart reso urcere lease rs

    O utp ut yM iss io n co m p le ted

    P la nt co m m a nds P la nt s ta tus

    D isp atch in g ru le s

    C o ntro ller state m o nito ring lo g ic

    xSv VS ⊗=

    xSr rS ⊗=

    xSy y ⊗= T ask co m p le te lo g ic

    User interface:mission planning,

    resource allocation, priority rules

    U.S. Patent

    Sensor readings

    events

    commands

    Decision-making

  • DE Model State Equation:

    DDucrcv uFuFrFvFx +++=

    The Secret: multiply = AND & addition = OR

    Tasks complete

    Resources available

    Targets / parts in

    Decision/Command input

    Task sequencing matrix – by Mission Planner

    Resource assignment matrix – by onsite Leader

    Fire next tasks

    New Matrix Formulation for Supervisory Control

    Compare with xk+1=Axk+Buk

    US Patent

    1001

    cv

    ⎡ ⎤⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎣ ⎦

    Means jobs 1 and 4 have just completed

    0110

    cr

    ⎡ ⎤⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎣ ⎦

    Means resources2 and 3 are available

  • Job Start Equation:Resource Release Equation:Product Output Equation:

    xSv vs =xSr rs =xSy y=

    Compare with yk=Cxk

    Output equations

  • Meaning of Matrices

    Resources requiredPrerequisite jobs

    Nextjob

    NextjobFv Fr

    Conditions fulfilled

    Nextjob Sv

    Task Sequencing Matrix Resource Requirements Matrix

    Releaseresource Sr

    Conditions fulfilled

    Resource Release MatrixTask Start Matrix

    Steward Kusiak

  • Construct Job Sequencing Matrix Fv

    Part A job 1Part A job 2Part A job 3

    Part B job 1Part B job 2Part B job 3

    Par

    t A jo

    b 1

    Par

    t B jo

    b 1

    Par

    t A jo

    b 2

    Par

    t B jo

    b 2

    Par

    t A jo

    b 3

    Par

    t B jo

    b 3

    Nextjobs

    Prerequisitejobs

    Used by Steward in ManufacturingTask Sequencing

    Contains same informationas the Bill of Materials(BOM)

    Task 1

    Task 2

  • Computer science task planners give the Fv Matrix

    e.g. hierarchical HTFN task planners

    Assembly Tree

    a

    b c

    d e

    0 1 1 0 00 0 0 0 00 0 0 1 10 0 0 0 00 0 0 0 0

    a b c d eab

    F cde

    ⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

    Reorder tasks to get lower diagonal matrix = causal

    Two 1’s in a row= assembly

  • Construct Resource Requirements Matrix FrUsed by Kusiak in ManufacturingResource Assignment

    Contains informationabout factory resources

    Nextjobs

    Prerequisiteresources

    Part A job 1Part A job 2Part A job 3

    Part B job 1Part B job 2Part B job 3

    Con

    veyo

    r 1C

    onve

    yor 3

    Fixt

    ure

    1

    Rob

    ot 1

    -IBM

    Rob

    ot 2

    -Pum

    aR

    obot

    3-A

    dept

  • Example

    ARRI

    ⎥⎥⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢⎢⎢

    =

    100001000000001000010000

    vF

    ⎥⎥⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢⎢⎢

    =

    000010000100000000100001

    TvS

    ⎥⎥⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢⎢⎢

    =

    000010000001

    uF

    1 0 00 1 10 0 10 0 11 1 00 1 0

    rF

    ⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥

    = ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

    ⎥⎥⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢⎢⎢

    =

    010100000010001000

    TrS

    ⎥⎥⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢⎢⎢

    =

    100000010000

    TyS

    p1 p2 p3 p4 r1 r2 r3

    p1 p2 p3 p4 r1 r2 r3

    pinA pinB

    poutA poutB

    DDucrcv uFuFrFvFx +++=xSv vs =xSr rs =

    xSy y=

  • crcv rFvFx +=

    OR / AND Matrix Algebra

    Example

    )1()0()1(]101[ cbacba

    x ∧∨∧∨∧=⎥⎥⎥

    ⎢⎢⎢

    ⎡=

    )0()1()0( cbax ∨∧∨∧∨=

    cax ∧=

    )1()0()1( cbax ∧∨∧∨∧=

    )1()0()1( cbax ∧∧∧∧∧=

    De Morgan’s Laws

    Don’t care about b

  • Easy to implement OR/ AND algebra in MATLAB

    C= AB

    for i= 1,Ifor j= 1,J

    c(i,j)=0for k= 1,K

    c(i,j)= c(i,j) .OR. ( a(i,k) .AND. b(k,j) )end

    endend

    Matrix multiply

  • • Formal rigorous framework• Complete DE dynamical description• Relation to known Manufacturing notions• Formal relation to other tools- Petri Nets, MAX-Plus• Easy to design, change, debug, and test• Formal deadlock analysis technique• Easy to apply any conflict resolution (dispatching) strategy• Optimization of resources• Easy to implement in any platform (MATLAB, LabVIEW, C,

    C++, visual basic, or any other)

    Advantages of the Matrix Formulation

  • Relation to Max-Plus Algebra

    DDucrcv uFuFrFvFx +++=xSV vs =xSr rs =xSy y=

    State equation

    Output equations

    Define diagonal timing matrices for job durations and resource release times.

    Then max plus is

    rFTSxFTSx rrrvvv +='

    OPERATIONS IN OR-AND ALGEBRA

    OPS. IN MAX-PLUS ALGEBRA

    Can also include nonlinear terms- correspond to decisions

  • Relation to Petri NetsResources availableJobs complete

    Trans. Trans.Fv Fr

    Transition

    Nextjobs Sv

    Transition

    Releaseresource Sr

  • UTA

    ARRI

    pinA p1t1 t2

    p3t4 t5

    p2 t3

    p4 t6pinB

    poutA

    poutB

    r1

    r3

    r2

    ⎥⎥⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢⎢⎢

    =

    100001000000001000010000

    vF

    ⎥⎥⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢⎢⎢

    =

    000010000100000000100001

    TvS

    ⎥⎥⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢⎢⎢

    =

    000010000001

    uF

    ⎥⎥⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢⎢⎢

    =

    000010100000010001

    rF

    ⎥⎥⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢⎢⎢

    =

    010100000010001000

    TrS

    ⎥⎥⎥⎥⎥⎥⎥⎥

    ⎢⎢⎢⎢⎢⎢⎢⎢

    =

    100000010000

    TyS

    p1 p2 p3 p4 r1 r2 r3

    p1 p2 p3 p4 r1 r2 r3

    pinA pinB

    poutA poutB

    Jobs along path

    Resources off path

    Task 1

    Task 2

  • ⎥⎥⎥

    ⎢⎢⎢

    001110001

    More About Fv

    J2

    J5

    J6

    J1 J3 J4

    Two 1’s in same col. = Routing (Job Shop)

    Two 1’s in same row = Assembly

    J3

    J4

    J5

    J1

    J2

    J6

    ⎥⎥⎥

    ⎢⎢⎢

    001110001

    More About Fr

    J2

    J5

    J6

    R1 R2 R3

    Two 1’s in same col. = Shared Resource

    Two 1’s in same row = Job needs multiple res.

    J5

    R2

    R3

    R1

    J2

    J6

    DECISIONNEEDED!

    DECISIONNEEDED!

  • Activity Completion Matrix

    Complete DE Dynamical Description

    ][ yrvu FFFFF =

    [ ]T T T T Tu v r yS S S S S=

    ],,,[ yT

    yrT

    rvT

    vuT

    uT FSFSFSFSFSM −−−−=−=

    xFStmxMtmtm TTT ][)()()1( −+=+=+

    DDucrcv uFuFrFvFx +++=

    PN incidence matrix

    Marking transition equation

    Activity Start Matrix

    DE state equation

    T T T T Tm u v r y⎡ ⎤= ⎣ ⎦

  • Include Process Times in Places

    )()()( tmtmtm pa +=

    )()()1( txStmtm Tpp +=+

    )()()1( txFtmtm aa −=+

    TTT OrtimesvtimesOT ],,,[=

    TtxSdiagttTtmdiagtT Tsamplependppend })({])([})({)1( +−=+

    Split up marking vector

    Add tokens

    Take away tokens

    Wait for process durations

  • Allows easy MATLAB simulation of DE systems

    DDucrcv uFuFrFvFx +++=

    )()()1( txStmtm Tpp +=+

    )()()1( txFtmtm aa −=+

    )1()1()1( +++=+ tmtmtm pa

    Duration time counting routine

    1. Rules- fire transitions

    2. Add tokens to places

    3. Wait until jobs finish

    4. Take tokens from places

    5. Find updated vectors for DE state equation

    Controller

    System model

    6. [ ] )( pmyrvu TTTTT =

    PNMarkingTransitionEq.

  • Mission / Task 1-Job sequence

    Mission 1 completedy1output

    S2 takes measurementS2m1Task 11

    R1 takes measurementR1m1Task 10

    R1 deploys UGS2R1dS21Task 9

    R2 takes measurementR2m1Task 8

    R1 gores to UGS1R1gS11Task 7

    R1 listens for interruptsR1lis1Task 6

    R1 retrieves UGS2R1rS21Task 5

    R2 goes to location AR2gA1Task 4

    R1 goes to UGS2R1gS21Task 3

    UGS5 takes measurementS5m1Task 2

    UGS4 takes measurementS4m1Task 1

    UGS1 launches chemical alertu1Input 1

    Descriptionnotationmission1

    Mission / Task 2-Job sequence

    Mission 2 completedy2output

    R1 docks the chargerR1dC2Task 5

    UGS3 takes measurementS3m2Task 4

    R1 charges UGS3R1cS32Task 3

    R1 goes to UGS3R1g S32Task 2

    UGS1 takes measurementS1m2Task 1

    UGS3 batteries are lowu2input

    DescriptionnotationMission2

    Fast Programming of Missions / Tasks

  • ⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟

    ⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜

    =

    100000000000100000000000100000000000110000000000010000000000010000000000011000000000001100000000000

    19

    18

    17

    16

    15

    14

    13

    12

    11

    1

    xxxxxxxxx

    Fv

    ⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟

    ⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜

    =

    000000000010000000000000000000000110000000000000000000111100000

    19

    18

    17

    16

    15

    14

    13

    12

    11

    1

    xxxxxxxxx

    Fr

    ⎟⎟⎟⎟⎟⎟⎟⎟

    ⎜⎜⎜⎜⎜⎜⎜⎜

    =

    100000100000100000100000100000

    26

    25

    24

    23

    22

    21

    2

    xxxxxx

    Fv

    ⎟⎟⎟⎟⎟⎟⎟⎟

    ⎜⎜⎜⎜⎜⎜⎜⎜

    =

    000000000000010010000000000000000010000100

    26

    25

    24

    23

    22

    21

    2

    xxxxxx

    Fr

    Mission 1 matrices

    Mission 2 matrices

  • 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140

    10

    20

    30

    40

    50

    60

    70 1S4m1S5m1R1gS21R2gA1R1rS21R1lis1R2m1R1gS11R1dS21R1m1S2m

    2S1m2R1gS32R1cS32S3m2R1dC

    R1R2UGS1UGS2UGS3UGS4UGS5

    Time [s]

    mobile wireless sensor network DE simulation priority 2-->1

    Reso

    urce

    s

    M

    issi

    on2

    M

    issi

    on 1

    u2

    u1

    0 20 40 60 80 100 120 140 0 20 40 60 80 100 120

    10

    20

    30

    40

    50

    60

    70 1S4m1S5m1R1gS21R2gA1R1rS21R1lis1R2m1R1gS11R1dS21R1m1S2m

    2S1m2R1gS32R1cS32S3m2R1dC

    R1R2UGS1UGS2UGS3UGS4UGS5

    Time [s]

    mobile wireless sensor network DE simulation priority1-->2

    Reso

    urce

    s

    Mis

    sion

    2

    M

    issi

    on1

    u1

    u2

    Simulation 2 –change mission/task priority

    Simulation Results

    Event traces

    • Up means task in progress

    • Down means resource in use

    Mission/Task 1 jobs

    Mission/Task 2 jobs

    Resources

  • R1gS1

    R1lis R1m

    X21 X2

    2 X23 X24 X25 X26

    X15 X16 X1

    7 X18 X19S5m

    R2gA

    R1rS2

    R2m

    R1dS2 S2m

    UGS2

    UGS1

    R1

    u1

    u2

    R1gS3S1m R1cS3 S3m R1dC y2

    Mission2 result

    y1 Mission1 result

    UGS3

    R1gS2

    S4m

    X14X13X

    12

    X11

    UGS4

    UGS5 R2

    PN Equivalent of Missions/Tasks

    Mission/Task 1

    Mission/Task 2

  • Discrete event controllerImplementation

    T asksco m p le ted v c

    R u le-b ased rea l tim e con tro lle r

    Cu curv uFuFrFvFx ⊗⊕⊗⊕⊗⊕⊗=

    Job s ta rt lo g ic

    R esource re lease lo g ic

    W ireless Sensor

    N etw o rk

    . . .

    u c

    Se nsor ou tp ut u

    R esourcere leased rc

    S tart tasks v s

    S tart reso urcere lease rs

    O utp ut yM iss io n co m p le ted

    P la nt co m m a nds P la nt s ta tus

    D isp atch in g ru le s

    C o ntro ller state m o nito ring lo g ic

    xSv VS ⊗=

    xSr rS ⊗=

    xSy y ⊗= T ask co m p le te lo g ic

    User interface:mission planning,

    resource allocation, priority rules

    U.S. Patent

    Sensor readings

    events

    commands

    Decision-making

  • R1u1

    R1u2

    R1u3

    R1u4

    R2u1

    R2u2

    R2u3

    R3u1

    R3u2

    Discrete events

    Results of LabVIEW Implementation on Actual Workcell

    Compare with MATLAB simulation!

    We can now simulate a DE controller and then implement it,Exactly as for continuous state controllers!!

  • Shared resources circular waits

    S4m2

    S1m1

    X21 X22 X23 X24 X

    25 X26

    R1cS11 R1dC1

    S3

    R1

    u1

    u2

    S3m2 R1gA2 R2mS22 S2m2 R2gC2

    y2 Mission2 result

    y1 Mission1 result

    S2

    X14X1

    3X12X11

    S4

    X27 X28

    R2

    R1gD2

    S1

    Critical subsystems cannot get fullShared Resources- which jobs to dispatch first?

    LBFS always works – but too conservative

    What is LBFS for multipart path systems?

  • Shared resources circular waits

    S4m2

    S1m1

    X21 X22 X23 X24 X

    25 X26

    R1cS11 R1dC1

    S3

    R1

    u1

    u2

    S3m2 R1gA2 R2mS22 S2m2 R2gC2

    y2 Mission2 result

    y1 Mission1 result

    S2

    X14 X1

    3X12X11

    S4

    X27 X28

    R2

    R1gD2

    S1

    Critical subsystems cannot get full

    = Initial resources available

  • ARRI Intelligent Material Handling (IMH) Cell3 robots, 3 conveyors, two part paths

    Need Supervisors to limit WIP in Critical Systems

  • 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180

    1R1gS11S1m1R1dC

    2R1gA2S3m2R2mS22S2m2R2gC2S4m2R1gA

    S1R1S2R2S3S4

    Time [s]

    Mobile wireless sensor network DE simulationRe

    sour

    ces

    Mis

    sion

    2

    Mis

    sion

    1

    Event time trace

    Simulation results

    Deadlock!

  • S4m2

    S1m1

    X21 X22 X23 X24 X

    25 X26

    R1cS11 R1dC1

    S3

    R1

    u1

    u2

    S3m2 R1gA2 R2mS22 S2m2 R2gC2

    y2 Mission2 result

    y1 Mission1 result

    S2

    X14X1

    3X12X11

    S4

    X27 X28

    R2

    R1gD2

    S1

    Critical subsystems cannot get full

    Finding the critical subsystems= CW resources

    = crit. syst.= P invariant minus the critical siphon= added output job places to make up critical siphon

  • Deadlock Analysis- easy with matrix DEC

    CS cannot get empty

    ⎥⎥⎦

    ⎢⎢⎣

    ⎡ ∧C

    FFCFSC vT

    rT

    vrTsSc =

    where denotes the element-by-element matrix ‘and’ operation. ∧

    Find critical siphons Shared resources in C

    rrW FSG = (in AND/OR algebra)

    i.e. if gij=1 then resource j waits for resource i

    Use string algebra to find a matrix C, wherein each column represents a circular wait.

    Find circular waits

    Wait relation graph- Wysk

  • Binary basis for p-invariants

    compute the Critical System for each CS using

    cSPCSysCrit ∧=..

    Critical systems cannot take up all resources

  • )()()()( vdTvdvdvdo FCSCFCCFJ ∧=∧=

    )())(( ioio CmCJm <

    Output transitions of CW

    Input transitions of CW

    Critical systems

    Critical systems cannot get full

    Simplified calculations

    MAXWIP dispatching

  • Deadlock Avoidance Dispatching MAXWIP Policy

    DDucrcv uFuFrFvFx +++=

    Deadlock Avoid Software Selects Dispatching Input uD

  • Discrete event controller

    T asksco m p le ted v c

    R u le-b ased rea l tim e con tro lle r

    Cu curv uFuFrFvFx ⊗⊕⊗⊕⊗⊕⊗=

    Job s ta rt lo g ic

    R esource re lease lo g ic

    W ireless Sensor

    N etw o rk

    . . .

    u c

    Se nsor ou tp ut u

    R esourcere leased rc

    S tart tasks v s

    S tart reso urcere lease rs

    O utp ut yM iss io n co m p le ted

    P la nt co m m a nds P la nt s ta tus

    D isp atch in g ru le s

    C o ntro ller state m o nito ring lo g ic

    xSv VS ⊗=

    xSr rS ⊗=

    xSy y ⊗= T ask co m p le te lo g ic

    Deadlock avoidance software here at top-

    Decision-making

    Sensor readings

    events

    commands

    Decision-making

  • 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180

    1R1gS11S1m1R1dC

    2R1gA2S3m2R2mS22S2m2R2gC2S4m2R1gA

    S1R1S2R2S3S4

    Time [s]

    Mobile wireless sensor network DE simulation

    Reso

    urce

    s

    M

    issi

    on2

    M

    issi

    on1

    0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180

    1R1gS11S1m1R1dC

    2R1gA2S3m2R2mS22S2m2R2gC2S4m2R1gA

    S1R1S2R2S3S4

    Time [s]

    Mobile wireless sensor network DE simulation

    Reso

    urce

    s

    Mis

    sion

    2

    Mis

    sion

    1

    Event time trace without deadlock avoidance

    Event time trace with deadlock avoidance

    Simulation results

  • New Work --Deadlock Avoidance for Free-Choice Routing Systems

    Problems with the old formulae for deadlock-need to make critical subsystems include alternate routing resources

    t1

    t2

    t3

    t4

    t5

    t6

    t7

    t8

    t9

    t10

    t11

    t12

    t13

    R1

    R2

    B1 B2 B3

    M1

    M2

    r1a r1b

    r2a r2b

    b1 b2 b3

    m1

    m2Pin Pout

    Decision Places- Choices in routing- select resource for next job

  • t1

    t2

    t3

    t4

    t5

    t6

    t7

    t8

    t9

    t10

    t11

    t12

    t13

    R1

    R2

    B1 B2 B3

    M1

    M2

    r1a r1b

    r2a r2b

    b1 b2 b3

    m1

    m2Pin Pout

    = CW resources= added output job places to make up critical siphon= crit. syst.= P invariant minus the critical siphon

    Does not work- t7 can still fire“Sneak out places”

  • t1

    t2

    t3

    t4

    t5

    t6

    t7

    t8

    t9

    t10

    t11

    t12

    t13

    R1

    R2

    B1 B2 B3

    M1

    M2

    r1a r1b

    r2a r2b

    b1 b2 b3

    m1

    m2Pin Pout

    = CW resources= add other CW containing the decision place output transitions= added output job places to make up critical siphon= crit. syst.= P invariant minus the critical siphon

  • Can have deadlock

    Cannot have deadlock

    Partitions CW into Equivalence Classes