Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of...

32
Representation from Representation from continuous systems to continuous systems to discrete event systems discrete event systems Dr Hongnian Yu Department of Computing
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    215
  • download

    0

Transcript of Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of...

Page 1: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Representation from continuous Representation from continuous systems to discrete event systems to discrete event

systemssystems

Dr Hongnian Yu

Department of Computing

Page 2: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Outline of the presentationOutline of the presentation

Motivation example Modelling and control of continuous

engineering systems Petri nets (PN) PN modelling of manufacturing systems Performance analysis using PN Scheduling using PN and AI search Summary

Page 3: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Motivation example Motivation example

We can represent numerals in many different ways, e.g. Arabic, Roman, English,

Chinese, etc. Which one shall we use? It

depends on the tasks. For numerical analysis, we prefer

the Arabic representation. E.g. carry out a simple multiplication (twenty five times thirty five =?)

57857

52153

52

To write a check, what will we use?

Problem Solving = Representation + Reasoning

Page 4: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Differential Equations A powerful representation tool of continuous engineering

systems

m

y(t)

u(t)

k

b

)()()()( tutkytybtym

u(t)

R L

C y(t)

(1) Mechanical system: Mass-spring-damper, m: mass, k: spring constant, b: friction constant, u(t): external force, y(t): displacement.

)()()()( tutytyRCtyLC

(2) Electrical system: RLC circuit

General form (State space representation)

)()()()( 001 tubtyatyaty

)(

),(

xgy

uxfx

Page 5: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Interesting Issues of Engineering Interesting Issues of Engineering SystemsSystems

Stability

),( uxfx )(xgy

x y u plant

),( uxfx )(xgy

K2

K1

- -

+ + yd x y u e plant

Controllability

Stable Neutral or Marginally stable

Unstable

Observability Optimality

disturbance Adaptation Robustness

Page 6: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Control MethodsControl Methods Adaptive control

Adaptive Control of Robot Manipulators Using a Popov Hyperstability Approach, Journal of Systems and Control Engineering, 1995.

Simple adaptive control Simple adaptive control of processes with uncertain time-

delay and Affine linear structured uncertainty, Journal of Control Theory and Application, 2001.

Robust control Exponentially Stable Robust Control Law For Robot

Manipulators, Journal of Control Theory and Applications, 1994.

Combined adaptive and robust control Robust Combined Adaptive and Variable Structure Adaptive

Control of Robot Manipulators, Journal of Robotica, 1998. Iterative learning control

Model Reference Parametric Adaptive Iterative Learning Control, 15th IFAC World Congress on Automatic Control, 2002.

Page 7: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Representation of discrete event Representation of discrete event systemssystems

Man-made systems Computer networks Communication networks Transportation networks Power networks Water networks Manufacturing systems Supply chains

Common features: discrete event systems Representation approaches: various, but not

unique Finite state automata MAXPLUS algebra Petri nets No standard representation (model) like differential

equations for continuous dynamic systems

Page 8: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Petri netsPetri nets A PN is a mathematical formalism and a Graph tool to model and analyze

discrete event dynamic systems. It is directed graphs with two types of nodes: places and transitions. Places represent conditions which may be ‘held’ and transitions represent events that may ‘occur’

Enabling rule: A transition t is enabled if and only

if all the input places of the transition t have a token.

Initial state

Final state

place: transition:

Firing rule: An enabled transition t may fire at

marking Mc. Firing a transition t will remove a token from each of its input places and will add a token to each of its output places.

t

t

Page 9: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Graphical representation of a Petri Graphical representation of a Petri netnet

P1T1

P2

P3

T2

T3

P5

T4

P4

an arc’s weightan arc’s weight

an arcan arc

a placea place

a transitiona transition

a tokena token

2

4

Page 10: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Petri nets: Mathematics ModelPetri nets: Mathematics ModelA Petri net is 5-tuple, PN=(P,T,I,O,M) where

P={p1,p2, ···, pmp} is a finite set of system states;T={t1,t2,···, tnp} is a finite set of transitions; I: the input (preincidence) function;O: output (postincidence) function;M: the m-component marking vector whose ith

component, M(pi) is the number of tokens in the ith place. M0 is an initial marking.

A Petri net from stage k to stage k+1 can be expressed by the following state equation

Mk+1 = Mk + CTuk (1)where Mk is the current marking state vector, uk is

the control vector and C=O-I is the incident matrix.

Page 11: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Example

P={p1, p2, p3}; T={t1, t2, t3}; I(t1)={}, I(t2)={p1, p2}, I(t3)={p3}; O(t1)={p1}, O(t2)={p3}, O(t3)={p2}Initial marking: M0=[1, 1, 0].

1 0 0

0 1 1

0 0 0

3

2

1

321

t

t

t

I

ppp

0 1 0

1 0 0

0 0 1

3

2

1

321

t

t

t

O

ppp

1- 1 0

1 1- 1

0 0 1

3

2

1

321

t

t

t

IOC

ppp

Using the firing rule , we have

M1=M0+etC=[1, 1, 0]+[0, 1, 0]C=[0, 0, 1] where et is the characteristic vector of t: et(x):=1 if x=t, else =0.

t1 t2 t3p1 p3

p2

Page 12: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Petri Nets: Time InformationPetri Nets: Time Information The concept of time is not explicitly given in the original

definition of PNs. For performance analysis and scheduling problems, it is necessary and useful to introduce time delays associated with transitions or places in their PN models.

A timed Petri net TPN=(PN,h): PN is a normal Petri net defined as the before;h: the time delay associated with the relevant state.

Pm

t(h)

Pr

Processing inh time

machineavailable

product inposition

Pm

tb

Pr

Po(h)

teStopping

Processing inh time

Starting

machineavailable

product inposition

Timed transition

Timed place

Page 13: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

ExampleExample

...

Parts

Machine 1 Buffer

Robot

Machine 2

Final Products

M1 M2B

R

I

t1 t2 t3 t4

t5

t6 t7

M1 M2B

R

I

t1 t2 t3 t4

t5

t6 t7

M1 M2B

R

I

t1 t2 t3 t4

t5

t6 t7

M1 M2B

R

I

t1 t2 t3 t4

t5

t6 t7

M1 M2B

R

I

t1 t2 t3 t4

t5

t6 t7

M1 M2B

R

I

t1 t2 t3 t4

t5

t6 t7

M1 M2B

R

I

t1 t2 t3 t4

t5

t6 t7

M1 M2B

R

I

t1 t2 t3 t4

t5

t6 t7

M1 M2B

R

I

t1 t2 t3 t4

t5

t6 t7

Page 14: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Batch Plant Flowchart with 1 Reactor and 1 Batch Plant Flowchart with 1 Reactor and 1 BlenderBlender

Synthesising and Analysis of a Batch Processing System Using Petri Synthesising and Analysis of a Batch Processing System Using Petri Nets, 1997.Nets, 1997.

Solvent 1. Solvent 2. Solvent 3. Solvent 4.

Reactor.

Blender.

Filling Tank.

The Petri net model of the batch plant

Batch plant = charging + reaction + blending + testing & discharging

Page 15: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

PN Modelling of Solvent ChargingPN Modelling of Solvent Charging

S1

S2

S3

S4

P1

P2

P3

P4

P5

t1

t2

t3

t4

t5

P6

Illustration of places and transitions.p1: Reactor availablep2: Charging Solvent 1 to the reactorp3. Charging Solvent 2 to the reactorp4: Charging Solvent 3 to the reactorp5: Charging Solvent 4 to the reactorp6: Reaction in progress to the reactorS1: Solvent 1S2: Solvent 2S3: Solvent 3S4: Solvent 4t1: Start charging solvent 1 t2: Stop charging solvent 1 & start charging solvent 2t3 : Stop charging solvent 2 & start charging solvent 3t4: Stop charging solvent 3 & start charging solvent 4

t5: Stop charging solvent 4 & start reaction

Page 16: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

PN Modelling of Solvent ChargingPN Modelling of Solvent Charging

S1

S2

S3

S4

P1

P2

P3

P4

P5

t1

t2

t3

t4

t5

P6

p'

t'

t"

This is a marked graph since every place has exactly one input and one output transition.

The net is live and reversible since every circuit has at least one token.

It is a safe net since no place has more than one token.

Page 17: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Modelling of Reactor and BlenderModelling of Reactor and Blender

R

B

P7

P8

P9

P10

t6

t7

t8

t9

t10

Illustration of places and transitions p7: Charging solventsp8: Reaction in progress to the reactorp9: Discharging reactor & charging blenderp10: Blending&testing&dischargingR: Reactor availableB: Blender availablet6: Start charging solvents t7: Stop charging solvents & start reactiont8 : Stop reaction&start charging blendert9: Stop charging&discharging & start blending

t10: Stop discharging blender

Page 18: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Modelling of Quality Modelling of Quality TestTest

logical place

S5

P12

P13

P14

P15

P16 P17

t12

t13

t14

t15t16

t17 t18

O1testingthe finalproduct O2

emptiying the blender

P19

Illustration of places and transitionsp12: Ready for blendingp13: Logical place for rejected materialp14: Blendingp15: Testingp16: Testing fail & require reblendingp17: Testing success & discharging blenderS5: Blending resource availableO1: Operator available for testingO2: Operator available for dischargingt12: Pumping to blender finish t13: Start blendingt14 : Stop blending & start testingt15: testing finish (fail)t16: testing finish (success) & start discharging blender t17: Start reblending

t16: Discharging finish

Page 19: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Reachability Graph

logical place

S5

P12

P13

P14

P15

P16 P17

t12

t13

t14

t15t16

t17t18

O1testingthe finalproduct O2

emptiying the blender

P19

t'

t"

p"

0 0 0 0 0 0 0 1 1 1 1

1 0 0 0 0 0 0 1 1 1 0

0 1 0 0 0 0 0 1 1 1 0

0 0 1 0 0 0 0 0 1 1 0

0 0 0 1 0 0 0 1 0 1 0

0 0 0 0 1 0 0 1 1 1 0 0 0 0 0 0 1 0 1 1 0 0

0 0 0 0 0 0 1 1 1 1 0

t'

t12

t13

t14

t15 t16

t17 t"

t18

Page 20: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Final Petri net model for the batch plantFinal Petri net model for the batch plant

R

B

P7

P8

P9

P1

t6

t7

t8

t9

t10

S1

S2

S3

S4

P1

P2

P3

P4

P5

t1

t2

t3

t4

t5

P6

logical place

S5

P1

P1

P1

P1

P1 P1

t12

t13

t14

t15t16

t17 t18

O1

testing

the final

product O2

emptiying the

blender

P1

Page 21: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Performance Analysis Using Timed Petri Performance Analysis Using Timed Petri NetsNets

Performance evaluation of a production system provides the ability to perceive clearly the production plan of the system. It is used to identify the bottleneck in the production unit, estimate the raw material required for production and decide operating policies. Time to charge each solvent is about 30 min. The total time for charging four solvents into the reactor is

about 120 min and this can be reflected as a delay time in place p7.

The time for reaction is 1080 min which represents the delay time in p8.

The time for discharging the reactor/charging the blender is 60 min which represents the delay time in p9.

The time for blending is 360 min. The time for testing and discharging is about 180 min. The delay time in p10 represents the sum of the blending time and the time for testing and discharging.

Page 22: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Performance AnalysisPerformance Analysis

When the times are deterministic, we can compute the cycle time of each circuit g:

Cg = m(g)/M(g) for g = { 1....q }where q is the number of circuits in the model, m(g) is the sum of place delays in the circuit g, M(g) is the sum of tokens in the circuit g

For a marked graph, the minimum cycle time, Cm isCm = Max { m(g)/M(g) }

To compute the result, it is important to list all the circuits produced by this model and show the minimum cycle time of each circuit. There are two elementary circuits in our model. Circuit 1 C1 = 120 + 1080 + 60 =1240 min Circuit 2 C2 = 60 + (360 + 180)=600 min

Therefore the minimum cycle time is 1240 minutes. The bottle neck machine is in element circuit 1, i.e., the reactor.

Page 23: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Scheduling Approaches• The mixed integer linear programming approach: It is similar to the linear

programming approach with linear objective function and constraints but some of its variables are integer and others binary.

The critical path scheduling approach (CPA) and the program evaluation and review technique (PERT): Both are network based methods.

The artificial intelligence (AI) based approaches: These include depth-first and breadth-first search approaches, Branch and Bound search approach, best-first search approach, climb hill search approach, beam search approach, A* (heuristic) search approach, etc. These are called the systematic approaches.

The non-systematic approaches: genetic algorithm based approach, simulation annealing approach, etc.

Rule based approaches: Copying the expertise of human schedulers and adopting the tactics that they use.

The simulation based approaches: discrete-event simulation.

Page 24: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Petri Net + AI Based Scheduling MethodsPetri Net + AI Based Scheduling Methods Scheduling:

Based on reachability tree analysis (for simple Petri nets) Uses reduced reachability space for more complex Petri nets

Example: A 2 product & 2 processor system is used to illustrate the method.

Problem statement:

Activities J1 J2

1 S1 (3) S1 (1) 2 S2 (2) S2 (8)

A complete description of the problem discussed is as follows: The objective function to be minimised is the time makespan

required to complete all the jobs. The given constraints are:

• precedence relationships among the jobs;• fixed number of resources and prescribed job-resource

assignment. The goal is to find a sequential order of jobs that satisfies the

above conditions.

Page 25: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

t5 t1

p1 p6

t2

t7 t3

t6

t8 t4

p2 p11 p7

p8 p3

p4 p12 p9

p5 p10

M 0

M 7

M 6

M 5

M 4

M 3

M 2

M 14M 1

t1

t5

t8

3

t7

t6

t5

t4

t3

t2

6

5

5

3

0

c=14

6

M 8

M 10

M 8

M 7

M 6

M 5

M 9

t5

t4

t6

t8

t7

t6

t4

4

c=13

5

5

3 M 9

M 11

M 12

5

t6

t3

43

3

M 13M 10

t7t3

44

t5

M 17M 12

M 16

M 15

M 18

M 21

M 19

M 22

M 8

M 20

1

1

0

4

14

99

c=11

9

t3

t8

t2

t7t2

t1

t6

t4

M 21

M 23M 17

t7

t1t8

t1

1

1 9

9t8

Page 26: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Gantt Chart

J2J1

J1 J1

Time

S1

S2

1463 5

J2 J1

J2 J1

Time

S1

S2

1 95 11

Firing sequence: t1t2t3t4t5t6t7t8 leads to c=14 min

Firing sequence: t5t6t1t7t2t8t3t4 leads to c=11 min (optimum)

Page 27: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

PN Based Intelligent Scheduling ApproachesPN Based Intelligent Scheduling Approaches A scheduling approach using Petri net modelling and a Branch &

Bound search, Proc. IEEE International Symposium on Assembly and Task Planning, 1995.

Planning through Petri Nets, Proc. of the Sixteenth Workshop of the UK Planning and Scheduling Special Interest Group, 1997.

Petri Net-Based Closed-Loop Control and On-line Scheduling of the Batch Process Plant, Proc. of CONTROL 98, 1998.

Rule-Based Petri Net Modelling and Scheduling of Flexible Manufacturing Systems, Proc. of 14th NCMR Conference, 1998.

Generic Net Modelling Framework for Petri Nets, IASTED International Conference on Intelligent Systems and Control, 1999

Integrating Petri Net Modelling and AI Based Heuristic Hybrid Search for Scheduling of FMS, Journal of Computer in Industry, 2002.

Advanced Scheduling Methodologies for FMS using Petri Nets and Artificial Intelligence, IEEE Trans on Robotics and Automation, 2002.

Petri Nets, Heuristic Search and Natural Evolution: Promising Scheduling Algorithm for Job Shop Systems, Proc. of The Third International ICSC Symposia on INTELLIGENT INDUSTRIAL AUTOMATION, 1999

Petri net Modelling and Witness Simulation of Manufacturing Systems, Proc. of Third World Manufacturing Congress, 2001

Page 28: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Petri Nets ApplicationsPetri Nets Applications

Performance analysisOptimisation, scheduling, planningSimulationControl synthesisFormal verification and validation

Page 29: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

SummarySummaryTwo types of systemsNatural (continuous) engineering systems

A powerful representation tool, differential equation, is available

Many analysis approaches have been developed

Man-made (discrete event) systemsMany representation approaches are

proposed, but none of them is as powerful as the differential equation

ComplexityUncertainty

Page 30: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Variable structure controlVariable structure control

Assumption: The bounds of the unknown parameters are known, i.e.},,2,1 |{ piii

Theorem. For the system (1), if the robust control laws are(t)=n(t)+l(t), n(t)=W(t)v(t)+W0(t), l(t)=-(Pll+Pcc-1Pcc)s(t)+PccE1(t)

),(),())(()()( 0 qGvqqCsvqDtWtW where

)],(,),(),([)()()()()( 211 tftftftWtstWPtEtF pTTT ,,,2,1 )()()(

1

pitWtstfn

jjiji

, ,)()( 1 itFt iiv )],sgn(,),sgn(),[sgn()( 211 pfffdiagtF

,~~)( 2nTTT RqqtE

then for a reasonably small positive constant , all the signals in the system are bounded and E(t) tends to zero with at least an exponential rate that is independentof the excitation.

p is the number of the uncertainty parameters, Pcc, , PllRnn are symmetric positive definite gain matrices, P12=Pcc

-1 Rnn, P1=[P12 Inn] Rn2n,

• Exponentially Stable Robust Control Law For Robot Manipulators, Journal of Control Theory and Applications, 1994.

Back

Dynamic equation: )()()()()()( 00 ttBtBtEtAtE c (1)

Page 31: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Adaptive controlAdaptive controlDynamic equation: )()()()()()( 00 ttBtBtEtAtE c

,0

0),()()(

1

0

I

qqCqDtA

,

0

]),()()[()()(

1

0

dd qqqCqGqDtq

tB

0

)()(

1 qDtBc

Define the control law as (t)=n(t)+l(t) (2)

Linear control law: qPPqPPPqPsPPP ccllccccllcccccclll~~)(~)( 111

Non-linear adaptive control law:

),(ˆ),(ˆ))((ˆ qGvqqCsvqDn stWK Td )(

(1)

Theorem. The control system (1) with the control law (2) is globally convergent, that is E(t) asymptotically converges to zero and all internal signals are bounded.

• Adaptive Control of Robot Manipulators, Proc. IEEE/RSJ International Conference on Intelligent Robots and Systems, 1992.

• Adaptive Control of Robot Manipulators Using a Popov Hyperstability Approach, Journal of Systems and Control Engineering, 1995.

Back

Page 32: Representation from continuous systems to discrete event systems Dr Hongnian Yu Department of Computing.

Iterative learning controlIterative learning control

Control input: (2) jvjpjjjj qKqKWWu ~~0

Parameter ILC law: (3) jTjdjj sWk 1

Theorem: For the robot system described by (1), if the control law (2) and the parameter iterative learning law (3) are used, the desired joint trajectories and their up to 2nd order derivatives are bounded, and the initial tracking errors (0)=0 and (0)=0 for j=1,2…, then the following properties hold:i

ii

iii

jq~

jq~

1,2,jfor )()( 1 tJtJ jj

0)(~ and ,0)(~ limlim

tqtq jj

jj

T][0, t )()(lim

ttjj

Dynamic equation: (1) )()()()()()( 00 ttBtBtEtAtE c

• Parametric Iterative Learning Control of Robot Manipulators, Proc. of the Chinese Automation Conference, 1999.

• Model Reference Parametric Adaptive Iterative Learning Control, 15th IFAC World Congress on Automatic Control, BARCELONA, Spain, 2002.

Back