Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Jack H.Integration and automation of manufacturing systems.2001.pdf
Скачиваний:
86
Добавлен:
23.08.2013
Размер:
3.84 Mб
Скачать

page 537

20. PETRI NETS

20.1 INTRODUCTION

Petri nets are useful tools for modelling systems with control flow. In particular they aid in modelling systems with concurrency, and parallelism. A set of routines have been developed at UWO to serve as the basis for a manufacturing simulation. The routines will support a number of various Petri net functions. The basic operation of the Petri net may be simulated. As well the EOR transitions will also be modelled. An attempt has been made to add ‘colors’ to the tokens, but at the present there is insufficient information (i.e., no references) to verify the implementation.

The routines have been written in a user friendly way to allow simple application interface. Places and Transitions are specified with textual names. A brief theory of petri nets follows.

These are like state diagrams, except multiple states can be active at the same time.

Other techniques, such as GRAFCET, are based on Petri nets.

20.2 A BRIEF OUTLINE OF PETRI NET THEORY

There are four basic elements in a petri net; places, transitions, arcs, and tokens. If we are to think in terms of a factory, tokens are equivalent to work parts. Arcs are the paths the work will follow through the factory. Places are buffers where parts are stored temporarily, and transitions are equivalent to machines where the parts are used to make new parts.

page 538

 

Token

Place

Arc

Transition

stock from

stock from

stock from

 

 

 

 

 

inventory

supplier

cutter

 

 

 

 

 

 

 

 

 

 

 

 

 

feeder

hopper

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bolt Maker

Nut Maker

Petri Net Model

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bolt Hopper

Nut Hopper

 

 

 

 

 

 

 

 

Screwing Machine

Finished Part

The basic operation is that tokens are introduced to the network, and then transitions are fired in different orders, and thus tokens are created and destroyed at the transitions. The example below follows the petri net for a few cycles. The first figure shows the Petri Net with the initial markings.

page 539

this transition was fired

this transition was fired

page 540

this transition was fired

The reader should note that there are a few interesting properties found in Petri nets.

• Transitions are fired when all of their inputs are satisfied, and the user specifies that transi-

tion.

• Most analysis of petri nets uses random firings of the transitions to obtain statistical performance.

Other basic references to the petri net theory are available in Peterson [1981] and Reisig [1985].

20.3 MORE REVIEW

• Ideal for parallel control problems

page 541

Token - Indicates place active (control)

Place - Indicates part of a system state (as before). If there is a token here, the place is valid, or active.

Transition - This will wait until all inputs have a token. Those tokens are destroyed and new tokens are put into all the outputs

e.g. An example of basic operation

The Petri Net (with no tokens)

page 542

Initial State : The tokens are added below, based upon the system

Step 1 : One of the states gives up a token (this is arbitrary and depends on the state)

transition condition fires

Step 2 : Another state gives up a token (again arbitrary)

In this case the transition can fire because both input places now have tokens, we are only waiting for the condition to occur.

page 543

Step 3: Here the conditions of the transition are met. The two input tokens are consumed and a new token is created for the output place.

Step 4: We see the condition for the transition met.

This continues on indefinitely.........

• Basic logic functions are shown below,

page 544

and

exclusive or

regulator

 

 

 

 

 

 

 

 

or

 

action

loop/repeat

if/wait

(state transition) synchronize

state machines (only 1 input/output on transitions)

• We can model various logic functions with Petri nets,

page 545

And - Both inputs must be present to fire

Recirculator - keeps only one action at a time

Or - one or the other input will start the process

If - this state can chose to send the token on either arc

Parallel - both processes will run in parallel at the same time

Reachability allows us to determine if a state (set of places) is possible given an initial condition.

Boundedness determines whether the number of states will be controlled, or grow/shrink.

• Deadlock and liveliness - will the controller find itself unable to continue.

page 546

• The procedure for producing ladder logic and other programs from the Petri Nets, is identi-

cal to producing Ladder Logic for SFC diagrams.

page 547

e.g. Petri Net for a single cup coffee maker

 

 

 

 

 

money

 

 

 

 

 

 

 

start

 

added

 

 

cleaning

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

cleaning done

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

cleaning

 

 

 

 

 

 

 

 

 

 

off

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

start water

 

 

 

 

 

start

 

 

 

 

 

 

 

heater

 

 

 

 

 

grinder

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

drop cup

 

 

 

temp. sensor

 

3 sec delay

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

heater off

 

 

 

 

 

stop

 

 

 

 

 

 

 

 

 

 

 

 

grinder

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

cup removed

filter coffee

10 sec delay

pour coffee

Try:

1.Add a coffee strength selection to the Petri Net.

2.Draw the petri net above using a Parallel Process Flowchart

3.Develop some ladder logic for the petri net diagram