next up previous
Next: Comparing Models Up: Modeling the Two-Pusher Example Previous: Using Petri Nets

Using NCES

The subsystems modeled by (safe) Petri Nets to describe system behavior are given in Figure 14. The input/output structure is shown by the condition and event arcs incident to the signals tex2html_wrap_inline3339 's, tex2html_wrap_inline3341 's, tex2html_wrap_inline3343 's, and tex2html_wrap_inline3345 's.

   figure809
Figure 14: PN-Modules and Input/Output Structure for NCES Model


Note: The diagram was created by a special editor which was developed to design such systems efficiently. This editor uses the identifier ``s'' for places, instead of ``p,'' by default. Also, transitions are shown as boxes here instead of bars.

From this, we can easily obtain the NCES model, shown in Figure 15:

displaymath2715

where:
tex2html_wrap_inline3347 ; tex2html_wrap_inline3349 ; tex2html_wrap_inline2751 is the incidence matrix:

tabular820


tex2html_wrap_inline3401
The condition signal matrix tex2html_wrap_inline2757 is such that its rows are labeled with the places, and its columns are labeled with the transitions. An entry tex2html_wrap_inline3405 if there is a condition arc from place tex2html_wrap_inline3407 to transition tex2html_wrap_inline2863 , and tex2html_wrap_inline3411 otherwise. The event signal matrix tex2html_wrap_inline2759 is a square matrix whose rows and columns are labeled with transitions. An entry tex2html_wrap_inline3415 if there is an event arc from transtion tex2html_wrap_inline2811 to transition tex2html_wrap_inline2863 , and tex2html_wrap_inline3421 otherwise.

   figure830
Figure 15: Net Condition Event System for Two-Pusher Example

Notice that the forbidden state specification, which is part of the model tex2html_wrap_inline2003 , is included in the NCES by means of the fact/transtion tex2html_wrap_inline3425 . We synthesize the safety controller as follows:

We develop a sequential controller for our desired path specification: bring a token from place tex2html_wrap_inline3441 to tex2html_wrap_inline3443 . There is only one path for this token to follow, which is determined by the sequence of transitions tex2html_wrap_inline3445 . We start by trying to put a token in tex2html_wrap_inline3447 by firing transition tex2html_wrap_inline3449 . Notice that tex2html_wrap_inline3449 is a forced transition, and so we must actually fire tex2html_wrap_inline2721 together with tex2html_wrap_inline3449 . To do this, we must ensure that the pre-places and conditions of both tex2html_wrap_inline2721 and tex2html_wrap_inline3449 have the appropriate values; these are tex2html_wrap_inline3461 , tex2html_wrap_inline3441 , and tex2html_wrap_inline3465 . Since the current (initial) marking has tokens in both tex2html_wrap_inline3461 and tex2html_wrap_inline3441 , then we set tex2html_wrap_inline3471 and fire tex2html_wrap_inline2721 and thus tex2html_wrap_inline3449 . This ``forward'' step is summarized in the first row of the table shown below.

tabular867


All other forward steps are determined in a similar way. Notice, however, that on the fifth row, the firing of transition tex2html_wrap_inline3309 , which takes us to the goal place tex2html_wrap_inline3443 , also takes us to a forbidden marking tex2html_wrap_inline3567 . This means that we should first remove tokens from place tex2html_wrap_inline3429 and then try again to put a token in tex2html_wrap_inline3433 , and thus in tex2html_wrap_inline3443 .

Finally, from the above table we can construct the entity C, the controller, which is given in Figure 16. This is a NCES with ``states'' tex2html_wrap_inline3577 , ... , tex2html_wrap_inline3579 . In the closed-looped system, the controller inputs, which are shown on the left, correspond to the plant outputs (the tex2html_wrap_inline3407 's), and the controller outputs, shown on the right, correspond to the signals tex2html_wrap_inline3583 's which will be inputs to the plant.

   figure902
Figure 16: Sequential Controller for Two-Pusher Example

Our next figure, Figure 17, shows the sequential controller described by means of a Sequential Function Chart. This is a language that can be directly implemented in a Programmable Logic Controller (PLC). It is built by using steps (rectangles) and transitions (bars). We can associate controller outputs (plant inputs) to each of these steps. These are on the right part of the diagram. The firing conditions, on the left, result from the marking of places which indicate the end of the preceding step or the necessary conditions to perform the next step. Boolean operations are described using Instruction List, which is also a programming language for PLC's similar to assembler code. The symbol LD denotes that a value of a variable is loaded into the accumulator of the PLC. The symbol AND denotes the appropriate boolean operation performed with the accumulator and the second value. The result is available in the accumulator of the PLC and plays the role of an additional firing condition of the transition in the controller. The controller transitions are forced to fire as soon as they are enabled.

   figure909
Figure 17: Sequential Function Chart for PLC


next up previous
Next: Comparing Models Up: Modeling the Two-Pusher Example Previous: Using Petri Nets

Luz E. Pinzon
Wed Oct 15 18:10:49 EDT 1997