Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(EOD).Mechatronics.pdf
Скачиваний:
82
Добавлен:
23.08.2013
Размер:
5.07 Mб
Скачать

page 81

6. PETRI NETS

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.

6.1 INTRODUCTION

• Ideal for parallel control problems

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 82

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 83

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 84

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 85

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.

The procedure for producing ladder logic and other programs from the Petri Nets, is identical to producing Ladder Logic for SFC diagrams.

page 86

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

Petri nets have been used for the modeling, control and validation of the control model [Teng

Соседние файлы в предмете Электротехника