GK-DEVS: Geometric and Kinematic DEVS Formalism for Simulation Modeling of 3Dimensional Multi-Component Systems Moon-Ho Hwang * and Byoung-Kyu Choi ** * Cubic Technology Research Center, Ace Techno-Tower 1201, 684-1, Deung Chon-Dong, Kang SeoKu, Seoul, South Korea, 157-303 ([email protected]) ;** Department of Industrial Engineering, Korea Advanced Institute of Science and Technology (KAIST), Taejon, South Korea, 305-701 ([email protected]) A combined discrete/continuous simulation methodology based on the DEVS (discrete event system specification) formalism is presented in this paper that satisfies the simulation requirements of 3-dimensional and dynamic systems with multi-components. We propose a geometric and kinematic DEVS (GK-DEVS) formalism that is able to describe the geometric and kinematic structure of a system and its continuous state dynamics as well as the interaction among the multi-components. To establish one model having dynamic behavior and a particular hierarchical structure, the atomic and the coupled model of the conventional DEVS are merged into one model in the proposed formalism. For simulation of the continuous motion of 3-D components, the sequential state set is partitioned into the discrete and the continuous state set and the rate of change function over the continuous state set is employed. Although modified from the conventional DEVS formalism, the GK-DEVS formalism preserves a hierarchical, modular modeling fashion and a coupling scheme. Furthermore, for the GK-DEVS model simulation, we propose an abstract simulation algorithm, called a GK-Simulator, in which data and control are separated and events are scheduled not globally but hierarchically so that an object-oriented principle is satisfied. The proposed GK-DEVS formalism and the GK-Simulator algorithm have been applied to the simulation of a flexible manufacturing system consisting of a 2-axis lathe, a 3-axis milling machine, and a vehicle-mounted robot. Keywords: DEVS, geometry, kinematics, 3-dimensional multi-component system, combined discrete/continuous simulation

1. Introduction As computing power of computers has rapidly improved in recent years, computer modeling applications have evolved from 2-dimensional to 3-dimensional, from static to dynamic, and from a component to a multi-component interaction system [1]. To achieve these goals, various approaches satisfying one or more features, but not all of them, have been developed from different viewpoints. Robotics is one of the most conventional areas and has mainly contributed motion control of 3-D hierarchical linkages considering velocities, torque and path generation [2]. The continuous motion of 3-D linked components has been very well modeled with the modeling methods. However, the conventional 3-D kinematics modeling methods have a significant limitation: they support only a continuous state system view. Due to this limitation, the interactions among the multicomponents are poorly represented in the methods. On the other hand, the discrete event system (DES) modeling method has been recognized as an alternative for simulating TRANSACTIONS of The Society for Modeling and Simulation International ISSN 0740-6797/01 Copyright © 2001 The Society for Modeling and Simulation International Volume 18, Number 3, pp. 159-173

the multi-component man-made systems in nature [3, 4]. In particular, discrete event system specification (DEVS) [12] is a hierarchical, modular DES formalism. In the DEVS formalism, a model can be decomposed into a set of hierarchically connected sub-models. Moreover, since all models have input ports and output ports as interfaces, model design and testing can be performed independently and modularly. Although the DEVS formalism can provide hierarchical and modular features, this formalism has not yet been used in simulation modeling of 3-D multi-component systems. Possible reasons for this omission are 1) the hierarchical view of the conventional DEVS is different from the hierarchical structure needed in 3-D kinematics modeling and 2) the kinematics motion in a 3-D system requires a particular continuous state system view. In the early 90s, the modeling views considering a continuous state system view as well as a discrete-event system were introduced. Fishwick [5, 6] proposed a multi-modeling methodology for qualitative model engineering. In the multi-modeling methodology, homogeneous refinements based on finite state automata and heterogeneous refinements employing Petri-net or differential equations were introduced. In the meantime, Praehofer also proposed a multi-formalism, called DEV/DESS [7, 8]. By adding continuous real numbers output/input and con-

Volume 18, Number 3 TRANSACTIONS 159

September TRANSACTIONS 2001

tinuous state change presented by a differential equation function, he extended DEVS to a combined continuous/discrete-event formalism. Even though these two methodologies provided a combined continuous/discrete event system view, however, they have no modeling features for kinematics in which coordinates of each model change continuously along hierarchical structures. Our extended DEVS formalism, called GK-DEVS, represents a modeling method for 3-dimensional multi-component systems in which each component interacts discretely with each other component and moves along its hierarchy. For the discrete interaction and hierarchical motion, we merge the atomic and the coupled model of the conventional DEVS [12] into one hierarchical model having its own dynamics. In other words, the proposed model adopts the discrete event dynamics from the DEVS atomic model and does the hierarchical and coupling semantics from the DEVS coupled model. Moreover, in order to model each component’s continuous motion, the sequential state set is partitioned into the discrete state set and the continuous state set. And then for more precise explanation, the continuous set is also categorized into a 3-D specific state set and the other set. Finally, for changing the continuous state at a cer-

tain discrete state, we use the rate of change function [11] describing the change of piecewise continuous state variables such as the 3-D hierarchical coordinates. In addition to the GK-DEVS formalism, we propose an abstract simulation algorithm, called GK-Simulator. The proposed algorithm employs the principle of data and control separation [9] [12] so that the GK-DEVS model works as data and the GKSimulator performs as control. Furthermore, based on an object-oriented paradigm, the algorithm hires a hierarchical scheduling method rather than a global scheduling one. Thus, scheduled events and continuous state changes are transmitted along the simulator's hierarchy so that a combined continuous/ discrete event simulation is performed. Using the GK-DEVS formalism and the GK-Simulator algorithm, we construct a flexible manufacturing system as a virtual manufacturing system in which multi-components interact with each other. The rest of the paper is organized as follows. The modeling and simulation scope of this research is defined in Section 2. Section 3 describes the GK-DEVS formalism along with a simple example. Section 4 presents an abstract simulation algorithm for the GK-DEVS model. A modeling and simulation example using a flexible manufacturing system is illustrated in Section 5. Conclusions and discussion are given in Section 6.

2. Simulation Modeling Scope

Figure 1. A 3-Axis Milling Machine

Figure 2. Piecewise Constant/Continuous State Variables in 3-D Motion

160 TRANSACTIONS Volume 18, Number 3

To help explain the characteristics of 3-D multi-component systems, we use an automated machine as an example. Figure 1 illustrates a milling machine with a computerized numerical controller (CNC). All axes move perpendicularly and independently based on the command generated/sent by the CNC. Each X-, Y, and Z-Axis works as a linear moving unit. The 3-Axis CNC monitors and controls all axes. At the tip of the Z-Axis, a tool can be chucked and it cuts a raw stock on the X-Axis table. If the X-Axis’s phase can be modeled by "WAIT" and “MOVE,” its position trajectory during the “MOVE” phase can be change continuously. In 3-D simulation considering spatial motion of components, some state variables like the “Position” should be modeled as piecewise continuous rather than piecewise constant as shown in Figure 2. In addition to a particular X-Axis motion, coincident motions along a hierarchical structure are frequently observed. Imagine a situation in which XAxis and Y-Axis stop as shown in Figure 3(a). At that time, the 3-Axis CNC determines to make the X-Axis and Y-Axis move by dX and dY, respectively. Since the X-Axis motion is defined on the Y-Axis, after each movement, the X-Axis positions can be hierarchically influenced as shown in Figure 3(b) rather than Figure 3(c). In spite of this simple example, many phenomena can occur in the real 3-D world: the interaction between the 3-Axis CNC and each axis, axes’ motion along the hierarchy, the tool's cutting feed control using PID (Proportional, Integral, and Derivative) control, and collision in 3-D components motion. Interaction between the 3-Axis CNC and each axis can be modeled as message passing. For kinematics simulation, each 3-D component’s coordinates should be transformed continuously and hierarchically from the topmost components to all of the

M.H. Hwang and B.K. Choi

leaf components. For simulation of the cutting feed PID control, the continuous output and input signals flow between the tool and its controller should be modeled. Furthermore, unschedulable accidents, such as “collision” among moving axes and a tool’s “breaking” during the cutting process, occur in the continuous state change and after being detected they should be treated as discrete events. Table 1 summarizes the phenomenon and its corresponding modeling method in a 3-D multi-component system. The scope of the paper is indicated in the last column of Table 1. How the uncovered phenomena can be modeled and simulated is briefly mentioned in Section 6. In the next section, we will propose a geometric and kinematic DEVS formalism satisfying the above two phenomena: the message interaction and motion of 3-D multi-components. (a) Start position

3. GK-DEVS: Geometric and Kinematic DEVS In order to define the GK-DEVS using system theoretical concept, we first briefly describe the concept of system. Then, with respect to the theory, we explain the GK-DEVS properties. Finally, we give a realistic example using GK-DEVS. 3.1 System A system is an abstract concept that describes how entities behave over time. It describes output behavior on the basis of inputs and state information. Formally a system is a 7-tuple: S =

(b) Hierarchical motion

where T is the time base; X is the input value set; Ω is the admissible set of segments over X and T; Y is the output value set; Q is the set of states; ∆: Q × Ω →Q is the state transition function; and Λ: Q → Y : is the output function. The system is subject to the following two constraints [11]: (1) Ω is closed under composition as well as under left segmentation. (2) For every pair of contiguous segments ω and ω′∈ Ω and for all q ∈ Q, ∆(q, ωω′)=∆ (∆ (q, ω)ω′). 3.2 GK-DEVS Definition We propose the GK-DEVS formalism, which is based on the DEVS [11][12] formalism and supports the geometric and kinematic modeling as the following form.

(c) Nonhierarchical motion

GK-DEVS = < X, S, Y, δint, δext, f, λ, ta, M, Z, SELECT > (1) where • X is the input event set; • Y is the output event set;

Figure 3. A Kinematics Example Table 1. Phenomena and Their Corresponding Modeling Method

Volume 18, Number 3 TRANSACTIONS 161

September TRANSACTIONS 2001

• S is the sequential state set, S = , Sdisc is the discrete state set, and Scont is the continuous state set; where Scont = is the geometric set; | P  R T=  is the local coordinates (4x4 homogeneous 0 0 0 | 1  transformation matrix) where R (3x3 matrix) is the local orientation; P (3x1 vector) is the local position, and Scont-GK is the continuous state set except GK; • δint : S → S: is the internal state transition function; • δext : Q × X→ S is the external transition function, where Q = {(s, e) | 0 ≤ e ≤ ta(s)} is the total state set; • f: Q → Scont is the rate of change function; A state segment Φq: → Q is a solution associated with (Sdisc, Scont, e) ∈ Q if (1) Φq (t1) = (sdisc, scont, e), (2) dΦq (t)/dt = f(Φq (t)), t ∈ . The solution for the state trajectory is given for t ∈ , by Φq (t) = (sdisc, scont + ∫tt f (Φ q (t ′))dt ′, e + t) . 1

• • • •

λ: S → Y is the output function; ta: S → ℜ 0∞ is the time advanced function; M is the children GK-DEVS set;

Z ⊆ Y H × X H is the coupling set where

Y H = U m.Y H ∪ Y is the hierarchical output event set and m ∈M

X

H

= U m.X H ∪ X is the hierarchical input event set; m ∈M

• SELECT : 2 M ∪{ self } ± {} → M ∪ {self } is the tie-breaking selector.

from the conventional atomic model. In order to model the continuous change, the sequential state set S is decomposed into the discrete state and the continuous state. The geometric and kinematic information is categorized in the continuous state. Moreover, for describing of continuous dynamic behavior, the rate of change function [7, 11] has been employed. Meanwhile, the last 3-tuple M, Z, and SELECT, have originated from the coupled model’s functionality of the DEVS. M is used for the hierarchical structure of a 3-D system. Z represents the hierarchical coupling scheme. The SELECT function is the concurrent tie-breaking method among children and itself. 3.3 Structure Characteristics Specified by GK-DEVS In terms of the system theory mentioned in Section 3.1, the structure specified by a GK-DEVS is time invariant and has the following characteristics: • Its time base T is the real numbers ℜ. • Its input set is X∅ = X ∪ {∅}, i.e., the input set of the dynamic system is the input set of the GK-DEVS together with a symbol ∅ ∉ X specifying the nonevent. The set Ω of admissible input segments is the set of all DEVS segments over X and T. • Its output set is Y∅ = Y ∪ {∅}, i.e., the output set of the dynamic system is the output set of the GK-DEVS together with a symbol ∅ ∉ Y. The output trajectories are DEVS segments over Y and T. • The state transition ∆: Q × Ω → Q is defined as follows: if e = ta( s), x = ∅ (δ int ( s), 0) e  ∆((s, e), x ) = ( s disc , s cont + ∫ f (Φ q (t ′) dt ′, e) if 0 < e < ta( s), x = ∅ 0 (δ ( s, e, x ), 0) if 0 < e ≤ ta( s), x ≠ ∅  ext

• The output function Λ: Q→ Y is defined by

Compared to the conventional DEVS, the GK-DEVS has only one model as in formula (1). The 10-tuple definitions can be seen as the fusion of the atomic model and the coupled model in the conventional DEVS. The first 8-tuple has been imported

λ ( s) if e = ta( s) Λ( s, e ) =  if e < ta( s) ∅

Figure 4. Coupling Scheme Comparison DEVS with GK-DEVS 162 TRANSACTIONS Volume 18, Number 3

M.H. Hwang and B.K. Choi

• Kinematics is defined along the model hierarchy using M children GK-DEVS set. Therefore, if pG is a geometry transformed by a local frame, the locally transformed geometry can be calculated as p G = T ⋅ G = U T ⋅ g . Similarly, before getting a g ∈G

geometry viewed from the universal coordinates UG, the transformation matrix

U Li T

of the i-th GK- DEVS model viewed from

the universal coordinates should be calculated by U  R | U P L i –1 U U L1 T = T T T = K Li L1 L2 Li   0 0 0 | 1  • Finally, the geometry viewed from the universal coordinates can be evaluated by

U

G = LUi T ⋅ G = U

g ∈G

U Li T ⋅ g

position through the Curr output port. After confirming each axis’s arrival, the 3-Axis repeats reading and commanding until all the NC file's lines are processed out. Here, since the Base model is a passive model and moreover has no relation with other components, it is omitted in Figure 5(b). The algebraic representations for all components in the milling machine are as follows: • X-Axis: X={Dest, Feed}, Y={Curr}, S=< Sdisc, Scont >, Sdisc={(phase)| phaseD{WAIT, MOVE}}; Scont={((G,T),(Axis, posi, dest, feed))| G: geometry set, T : 4x4 Matrix, 3

AxisD ½ , posi, destD ½ , feedD ½ 0 + };

The initial state is as follows:

• The hierarchical coupling scheme is a direct one. With the proposed coupling scheme, any level of GK-DEVS models can be coupled each other. Figure 4 compares the conventional DEVS’ coupling scheme with the GK-DEVS’s one using an example of a serial 6 linkage industrial robot. In the conventional DEVS, internal coupling among the direct children model only is permitted. However, as shown in Figure 4(b) in which the vertical lines indicate their hierarchical structures, internal coupling among not only the direct children but also the descendant is allowed. Even though our hierarchical and direct coupling scheme might be less modular, the reasons the proposed scheme is used are as follows: (1) It is simple and easy to connect, with less coupling but equivalent functionality; (2) It is more compatible and realistic. In the real 6-serial linkage robot, there are no “external input couples” and “external output couples” but only direct coupling. However, since we select the proposed direct coupling scheme, we are not able to use “hierarchical y-to-x message passing [12]” any more. Thus, an output y is transmitted via any influence’s input x directly rather than via one’s parent simulator.

phase=(WAIT); G={polygons illustrated in Figure 5(a)}, T0.R= [ [1, 0, 0]T, [0, 1, 0] T, [0, 0, 1] T], T0.P = [xxAxis, yxAxis, zxAxis] T; Axis=[1,0,0] T; posi = 0; dest ='; feed = 0;

b ext (( phase, G, T, Axis, posi, dest, feed), e, x) { if ( x == Feed) feed = Feed; else

dest = Dest;

phase = MOVE; }

b int ( phase, G, T, Axis, posi, dest, feed) { if ( phase == MOVE) phase = Wait; } f(( phase, G, T, Axis, posi, dest, feed), e) {

3.4 A GK-DEVS Milling Machine Example Before giving the algebraic representation, we illustrate the milling machine example mentioned in Section 2. The components’ geometry and their hierarchical structures are illustrated in Figure 5(a) in which lines connecting among GK-DEVS models indicate hierarchy. In the hierarchy, the Base model is the top leveled link. The Y-Axis, the 3-Axis CNC, and the Z-Axis are attached to the Base model. And finally, the X-Axis is attached to the Y-Axis. Figure 5(b) visualizes the dynamics and the couplings among the milling components. The 3-Axis CNC reads the line in its NC (numerical control) file and generates command signals (Destination, Feed) for each axis. Through each DestX, DestY, and DestZ output port, the 3-Axis CNC sends the destination of each axis. At the same time, the 3-Axis transmits the moving speed, called feed, through each FeedX, FeedY, and FeedZ output port. Each X-axis, Y-axis, and Z-axis moves according to its destination and feed. After arriving at their destination, all the axes acknowledge their arrival by sending their

if (phase == MOVE){ d T.P / dt = feed*Axis; d posi / dt = feed; } else

{ d T.P / dt = 0; d posi / dt = 0; }

}

h ( phase, G, T, Axis, posi, dest, feed) { if( phase == MOVE) Curr = posi; } ta( phase, G, T, Axis, posi, dest, feed) { if( phase == MOVE) return |dest-posi|/feed; else

return ';

} M= { } ; Z = { } ; SELECT(X-Axis)=X-Axis;

Volume 18, Number 3 TRANSACTIONS 163

September TRANSACTIONS 2001

(a) Geometry and Hierarchical Structure

(b) Coupling Relations and Phase Transition Diagram Figure 5. A GK-DEVS Milling Machine

164 TRANSACTIONS Volume 18, Number 3

M.H. Hwang and B.K. Choi

• Y-Axis: X, Y, S,

b ext , b int , f, h , ta, Z are the same as of X-Axis except the initial

Axis=[0,1,0] T and T0.P = [xyAxis, yyAxis, zyAxis] T; M={X-Axis}, SELECT: SELECT(X-Axis)=X-Axis; SELECT(Y-Axis)=Y-Axis; SELECT(X-Axis, Y-Axis) = X-Axis;

• Z-Axis: X, Y, S,

b ext , b int , f, h , ta, M, Z are the same as of X-Axis except the initial

Axis=[0,0,1] and T0.P = [xzAxis, yzAxis, zzAxis]; SELECT(Z-Axis)=Z-Axis;

• 3-Axis CNC:

X={}, Y={}, S=< Sdisc, Scont >, Sdisc={}; Scont={(G,T)};

X={CurrX, CurrY, CurrZ}, Y={DestX, DestY, DestZ, FeedX, FeedY, FeedZ}, Sdisc={(phase)| phaseD{INIT, WAIT, COMMAND}};

The initial state is as follows:

Scont={(G, T, Cx, Cy, Cz, Dx, Dy, Dz, Fx, Fy, Fz) | G: geometry set, T: 4x4 Matrix, Cx, Cy, Cz, Dx, Dy, Dz D ½ , Fx, Fy, Fz D ½ 0 + };

The initial state is as follows:

• Base:

4. Abstract Simulation This section describes an abstract simulation algorithm for the proposed GK-DEVS formalism. In designing the algorithm, we take advantage of the separation of data and control [9, 12]. In this paper, the GK-DEVS models might be data and our abstracted simulation algorithm can be controlled. In addition, for event scheduling, in order to act on an object-oriented modeling paradigm, we adopt hierarchical scheduling rather than a global one, the same as in [12]. As a result, each GK-DEVS model associates its simulation processor, called the GK-Simulator.

Volume 18, Number 3 TRANSACTIONS 165

September TRANSACTIONS 2001

Figure 6. The Simulation Scope

4.1 Root-Coordinator Figure 6 conceptually depicts activities on the time horizon. Our paper includes the two features: (1) Discrete Event Simulation (2) Continuous State Simulation for Animation To perform the discrete event and continuous state simulation, the message types treated in our abstract simulation algorithm are (*, t): the next internal event message; (y,t), (x,t): the external output and input event message; (done,t): the completion message; and (Ø ,t): the nonevent message. At the top level of the hierarchy, the Root-Coordinator sends a (*,t) or (Ø ,t) message to its child and receives a (done,t) message from its child as shown in Figure 7. The Root-Coordinator's main loop stops when the minimum of the next event schedule time tne and the visualization time tnv passes over the final simulation time tf. For continuous state change, the Root-Coordinator sends a (Ø, t) up to minimum (tne, tnv) advancing by the continuous time step tci. If the next event schedule time tne is earlier than the visualization time tnv, the Root-Coordinator sends a (*, tne) message to its child simulator, then updates the tne. On

the other hand, if the visualization time tnv is more imminent than the event schedule time tne, the Root-Coordinator visualizes models’ status for the user, and then updates the next visualization time tnv. In addition, when the Root-Coordinator receives a (done, t) message, its next event schedule time tne is updated by t. The main loop and the procedure for (done, t) of the Root-Coordinator are shown in Algorithm 1(a) and Algorithm 1(b), respectively.

Figure 7. The Structure and Messages of the Root-Coordinator

Algorithm 1. The Root-Coordinator Procedures

166 TRANSACTIONS Volume 18, Number 3

M.H. Hwang and B.K. Choi

Figure 8. The Structure and Messages of the GK-Simulator

4.2 GK-Simulator As the simulation processor for a GK-DEVS model, the GKSimulator has memory variables: its own next event schedule time (tNself), its own last event occurrence time (tLself), the elapsed time (e), the earliest next event time of children (tNchild), the correspondent model’s state set (S), the correspondent model’s global coordinates (UT), and the correspondent model’s global geometry (∪G). And along the hierarchical structure, the (*, t), (Ø, t), (done, t) messages are transmitted vertically. And according to the coupling relation, a (y, t) message of an influencer model is translated into a set of (x, t) message. And each translated message is transmitted horizontally to each influenced model. Figure 8 shows the structure and message types of a GK-Simulator. When a GK-Simulator receives a (*, t) message informing a scheduling event, the GK-Simulator distributes the (*, t) message to itself or one of its children. At that time, if there are ties among children and itself, the tie-breaking function SELECT is used. When the (*, t) is distributed to itself, the simulator generates the output event set y using the output function λ. And each generated output event is translated into influencee’s input event (x,t). After generating and transmitting its output event(s), its state variables are changed by its internal transition function δint. Then the simulator updates its own last event time tLself and its own next event schedule time tNself. On the other hand, when the destination of a (*, t) message should be a certain child, the destination child is selected according to its next event schedule time and the SELECT function if tie-breaking is needed. After sending the (*, t) message to the selected child, the simulator resorts the children’s event list according to the next event schedule time. In addition, the simulator updates the imminent child’s next event time tNchild by the earliest time of children's tN. Finally, the total next event schedule time tN of the GKSimulator is determined by the minimum of its own next event

Algorithm 2. The GK-Simulator Procedure for (*, t)

Algorithm 3. The GK-Simulator Procedure for (x, t)

time tNself and the child’s next event time tNchild. The GKSimulator's procedure for (*, t) is illustrated in Algorithm 2. When the simulator receives a (x,t) message1, the elapsed time (e) of a certain state is set to “t – tLself” and then the state set is updated as the result of its external event function δext. Also, its own last event time tLself is updated by the message time t and its own next event schedule time tNself is scheduled at the time t plus ta(s). The total next event time tN is calculated with the minimum of tNself and tNchild. And the simulator informs the parent of the time tN through a (done, tN) message so that its parent reschedules the children event list in which it belongs. Algorithm 3 depicts the GK-Simulator’s procedure handling a (x,t) message. When the GK-Simulator receives a (done,t) message, the simulator resorts its children event list by each tN and updates tNchild by the most imminent tN among the children event list. The total next event time tN is calculated with the minimum of 1 In contrast to processing of a (*,t) message, the handling procedure

for a (x,t) message is designed to transmit from an influencer to its influencee(s) directly, not hierarchically as described in line 4 of Algorithm 2.

Volume 18, Number 3 TRANSACTIONS 167

September TRANSACTIONS 2001

Algorithm 4. The GK-Simulator Procedure for (done, t)

tNself and tNchild. And then the simulator sends the (done, tN) message to its parent simulator. Algorithm 4 shows the GKSimulator’s procedure treating a (done,t) message. When the GK-Simulator receives a (Ø,t) message, it updates the elapsed time and the continuous state set using the rate of change function. And then, using the updated homogeneous transformation matrix, the global transformation matrix and global transformed geometry are calculated. In addition, along the kinematics hierarchy, the simulator sends the (Ø,t) message to all of its child simulators. Algorithm 5 describes the GKSimulator’s procedures for a (Ø,t) message. 4.3 Example of Hierarchical Scheduling and Motion This section gives an example of hierarchical scheduling using the GK-Simulators. The target system is the CNC milling machine introduced in Section 3.4. Focused on the next event schedule time, Figure 9 illustrates the hierarchical schedule changes of the GK-Simulator processors corresponding to the GK-DEVS models in Section 3.4. As mentioned in Section 3.4, the 3-Axis CNC's initial phase is INIT and its ta(INIT) is 1. So at the simulation start time 1, the 3-Axis CNC’s own next event schedule time tNself becomes 1. Since the 3-Axis CNC has no child simulators, the child’s next schedule time tNchild is always set to infinite (∞). As a result the 3-Axis CNC’s total next event schedule time tN becomes 1. At that time, since all the axes’ initial phases are passive, each axis’s tNself is infinite. In this example, the X-Axis and Z-Axis have no children, their tNchild remains infinite and, as a result, their tN becomes infinite too. The Y-Axis having the X-Axis as a child sets the child next event schedule tNchild to infinite. As a result, the child next event time of the Base model having the Y-Axis, 3-Axis CNC, and Z-Axis as children becomes zero according to the 3-Axis CNC’s tN, that is, the minimum value of all children’s tN. The Base model is always passive, so its tNself remains infinite. In spite of its passive state, because the Base model’s child next event schedule is 1, the Base model’s total next event schedule can become 1. After all, the Root-Coordinator's next event time is evaluated as 1. Figure 9(a) illustrates the initial hierarchical schedule. Consider the situation at time 1 when the destination and feed values generated by the 3-Axis CNC are transmitted through the DestX(=250mm), FeedX(=100mm/sec), DestY(=550mm), FeedY(100mm/sec), DestZ(=350mm), and FeedZ(=100mm/sec) input ports to the X-Axis, Y-Axis, and Z-Axis model. As shown in Section 3.4, the time advance value in the MOVE phase has 168 TRANSACTIONS Volume 18, Number 3

1 For integration methods, a causal method and non-casual method are most

frequently employed [8, 10]. A detailed description for numerical integration methods can be found in [16, 17].

Algorithm 5. GK-Simulator’s Procedure for (Ø,t)

been calculated by dividing the distance from the current position to the destination by the feed value. So moving times of XAxis, Y-Axis, and Z-Axis are '3.5', '6.5', and '4.5', respectively, The situation is illustrated in Figure 9(b). In this situation, notice that, for the minimum time selection, the Y-Axis's total next event schedule time (tN=3.5) is not the same as the Y-Axis's own next event schedule time (tNself=6.5), but is the same as its child next event schedule (tNchild =3.5). For the same reason, the Base model’s tN and the Root-Coordinate’s tne are '3.5'. At the time 3.5, the phase of the X-Axis model changes MOVE to WAIT. And its ta(WAIT) is infinite, so its own and total next schedule time also becomes infinite. For the minimum time selection, the Y-Axis’s tN becomes the same as the tNself (=6.5) as shown in Figure 9(c). However, since the YAxis model’s tN (=6.5) is later than the Z-Axis model’s (=4.5), the Base model’s and the Root-Coordinator’s next event schedule time is calculated as '4.5'. When the time flows up to '4.5', the Z-Axis's moving phase is terminated and its tNself and tN become infinite. Figure 9(d) illustrates that situation in which among the GK-DEVS models, the Y-Axis is the only one active model. So the Base model’s and the Root-Coordinate’s next event schedule accords with the Y-Axis’s (=6.5). During the simulation and animation, the (Ø, t) message is transmitted along the hierarchical structure. At that time, each model’s motion in 3-D space is evaluated using the rate change function. As mentioned in Section 3.4, assume the rate change function over the position variable of the X-Axis and the Y-Axis is the same as d position / dt = feed, if its phase = MOVE, d position /dt = 0 otherwise. Since the X-Axis’s motion is defined along the Y-Axis, the global position UT.P can be changed during the parent Y-Axis changing. Figure 10 illustrates the state trajectories focused on continuous and hierarchical motions. In terms of a local motion, the position of the X-Axis is changed linearly from 0 to 250 during the time interval [1, 3.5]. During [3.5, 8], the local position remains constant 250. In terms of global coordinates as mentioned in Section 3.3, however, the position vector UT.P of the X-Axis is changed linearly from

M.H. Hwang and B.K. Choi

Figure 9. Hierarchical Scheduling for a 3-D Milling Machine

[0,0,0] to [250,250,0] during the time interval [1, 3.5]. Even though the X-Axis remains stopped, its global position vector UT.P is also changed from [250,250,0] to [250, 550,0] because of the Y-Axis movement. Figure 10(c) shows the motions of the X-Axis and the Y-Axis by displaying each UG mentioned in Section 3.3.

5. Example: A Flexible Manufacturing System This section introduces a modeling and simulation example for a flexible manufacturing system (FMS) whose layout is shown in Figure 11(a). In the FMS, there are three automated machines:

a 3-axis milling machine, a 2-axis lathe, and a 6-link robot. The lathe performs the helical-shape cutting processes and the milling machine does the drilling, slotting, and so on. The robot mounted on a rail-guided vehicle can slide to the front of each machine, and it loads (unloads) the raw-stock to (from) the milling machine and lathe. Three automated machines have their own computerized numerical controller as mentioned Sections 2 and 3. All CNCs monitor and control the movement of associated manipulator's links. In addition, in order to cooperate with other machines, the CNCs interact with each other. Figure 11(b) illustrates the

Volume 18, Number 3 TRANSACTIONS 169

September TRANSACTIONS 2001

Figure 10. State Trajectories of X-Axis and Y-Axis

coupling relation among them1. In Figure 11(b), the coupling for motion control is illustrated vertically while the coupling for cooperation is shown horizontally. Figure 12 visualizes the 3-D status of the FMS simulation. After loading the raw-stock to the lathe as shown in Figure 12(a), the robot retrieves its links as shown in Figure 12(b). After the retrieval, the robot sends a “loading completion” message to the lathe and then the lathe starts turning and cutting. When the lathe completes the cutting process, it transmits the “lathing completion” message to the waiting robot, which approaches to pick up the lathed stock as shown in Figure 12(c). After unloading the stock from the lathe, the robot moves to the 1 In Figure 11(b), the hierarchical structure is omitted.

170 TRANSACTIONS Volume 18, Number 3

milling machine as shown in Figure 12(d). Similar to the lathing process, the robot loads the stock as shown in Figure 12(e) and then retrieves its links as shown in Figure 12(e). After the retrieval, the robot sends a “loading complete” message to the milling machine informing it to start cutting.

6. Conclusions and Discussion This paper has proposed a new formalism, called GK-DEVS, for simulation modeling of 3-dimensional multi-components systems. Based on the DEVS formalism, the GK-DEVS formalism has been extended to model the 3-D geometry and kinematics motion. For the hierarchical structure required in kinematics modeling, we have merged the atomic model and the

M.H. Hwang and B.K. Choi

(a) An FMS Layout

(b) Couplings among Components

Figure 11. An FMS Example

coupled model of the conventional DEVS into one hierarchical model. From the conventional coupled model, the GK-DEVS model has adopted the hierarchical and coupling information. Meanwhile, the atomic model’s properties of the conventional DEVS have been imported to describe the basic discrete event system behavior. Moreover, in order to model and simulate the hierarchical continuous motion, the sequential state set has been categorized into the discrete state set and the continuous state set. Then the continuous state set has been also partitioned into a 3-D specific state set and other set. For changing the continuous state at a certain discrete state, we have employed the rate of change function describing the change of piecewise continuous state variables such as the 3-D hierarchical coordinates. In

addition to proposed modeling formalism, based on the datacontrol separation principle and hierarchical scheduling concept, an abstracted simulation algorithm, named the GK-Simulator, has been developed to support a combined continuous/ discrete event simulation. Using the GK-DEVS formalism and the GK-Simulator algorithm, we were able to simulate and animate a 3-D flexible manufacturing system in which some automated machines cooperate together. As summarized in Table 1 of Section 2, this paper deals with two main features among the phenomena required in 3-D space simulation: event interaction and hierarchical motion.

Volume 18, Number 3 TRANSACTIONS 171

September TRANSACTIONS 2001

(a)

(b)

(c)

(d)

(e)

(f)

Figure 12. Simulation of FMS Components Cooperation

For the PID control frequently employed in the continuous system control, the proposed formalism should be extended to support the continuous input and output segments that were rigorously researched in DEV/DESS [7, 8]. Moreover, to support simulation modeling of unschedulable accidents, for example, a collision in the 3-D space [13], among the moving multi-components such as in the robot, the milling machine and the lathes in the previous FMS example, the accidents can be detected in continuous simulation and treated as discrete events whether they are scheduled or unscheduled. Very similar to the zero crossing detection of a differential equation [10], we have implemented the hierarchical scheduling algorithm in which the unschedulable collision is found in the continuous state simulation and treated as a discrete event [14]. Additionally, in order to establish a virtual environment supporting various graphical functionalities, we have been implementing the GK-DEVS formalism reflecting the virtual reality modeling language (VRML) features [15].

7. Acknowledgments We thank Mr. Sang-Uk Cheon, who helped us to implement the GK-DEVS classes for the FMS example. This work was supported by the Korean Small and Medium Business Administration.

172 TRANSACTIONS Volume 18, Number 3

8. References [1] P. Klingstam and P. Gullander, "Overview of Simulation Tools for Computer-Aided Production Engineering," Computer in Industry, V38, 1999, pp.173-186 [2] John J. Craig, Introduction to Robotics, Mechanics and Control, 2nd Edition, Addison Wesley, 1989 [3] Yu-Chi Ho, "Scanning the Issue," Proceedings of the IEEE, V77, 1989, pp. 3-6 [4] Yu-Chi Ho, "Forward to the Special Issue," Discrete Event Dynamic Systems: Theory and Applications, V3, 1993, pp. 111 [5] Paul A. Fishwick and Bernard P. Zeigler, "Multimodeling Methodology for Qualitative Modeling Engineering," ACM Transactions on Modeling and Computer Simulation, V2, N1, January, 1992, P52-81 [6] Paul A. Fishwick, "Simulation Environment for Multimodeling," Discrete Event Dynamic Systems: Theory and Applications, V3, N2/3, July, 1993, pp.151-172 [7] H. Praehofer, System Theoretic Foundation for Combined DiscreteContinuous System Simulation, Ph.D. Thesis, Department of Systems Theory, University of Linz, Austria, 1991 [8] H. Praehofer, F. Auernig and G. Reisinger, "An Environment for DEVS-Based Multiformalism Simulation in Common Lisp/ CLOS", Discrete Event Dynamic Systems: Theory and Applications, VOL. 3, No 2/3, July, 1993, pp. 81-98 [9] Tag G. Kim, Lecture Note: EE612, EE Dept, KAIST, http:// smslab.kaist.ac.kr/Course/EE612/)

M.H. Hwang and B.K. Choi

[10] Gernot Reisinger, Simulation of Combined Discrete-Continuous, Modular Hierarchical Models in CommonLisp/CLOS, M.S. Thesis, Department of Systems Theory and Information Engineering, Johanners Kepler University Linz, Austria, 1995 [11] Bernard P. Zeigler, Theory of Modelling and Simulation, John Wiley & Sons, New York, 1976, [12] Bernard P. Zeigler, Multifacetted Modeling and Discrete Event Simulation, Academic Press, Orlando, FL, 1984, [13] T.C. Hudson, M.C. Lin, J. Cohen, S. Gottschalk, D. Manocha, "VCollide: Accelerated Collision Detection for VRML," In Proc. of VRML Conference, 1997, pp.119-125 [14] Moon-Ho Hwang, Sang-Uk Choen, and Min-Ho Yoo, "A Combined Continuous/Discrete Event Simulation for 3-D Spatial Collision Treatment In Virtual Manufacturing Systems," Proceedings of the Korean Society of Machine Tool Engineers ’99, Han-Yang University, Seoul, pp.16-21 (in Korean) [15] Rikk Carey and Gavin Bell, The Annotated VRML 2.0 Reference Manual, 2nd Edition, Addison Wesley Developers Press, 1997 [16] R.L. Burden and J.D. Faires, Numerical Analysis, 4 th ed. PWSKENT Publishing Company, 1989 [17] W.H. Press, S.A. Teukolsky, W.T. Vetterling, and B.P. Flannery, Numerical Recipes in C, 2 th ed. Cambridge University Press, 1992

Moon-Ho Hwang is currently working for Cubictek, Co., Ltd, Seoul, Korea. He received a BS in industrial engineering from Hong-Ik University, Korea in 1990, and received an MS and a PhD from the Korea Advanced Institute of Science and Technology (KAIST) in 1992 and in 1999, respectively, all in industrial engineering. His research interests include discrete-event system modeling and simulation, computer graphics, and virtual manufacturing. Byong-Kyu Choi is a professor of industrial engineering. He received a BS from Seoul National University, Korea, in 1973, an MS from the Korea Advanced Institute of Science and Technology (KAIST) in 1975, and a PhD from Purdue University, in 1982, all in industrial engineering. He joined KAIST in early 1983 and spent a year at Purdue as a visiting associate professor in 1988. His current research interests include surface modeling, CAD/CAM, CAPP, virtual manufacturing, and discrete-event system modeling and simulation.

Volume 18, Number 3 TRANSACTIONS 173

GK-DEVS: Geometric and Kinematic DEVS Formalism ...

malism satisfying the above two phenomena: the message in- teraction and motion of 3-D multi-components. 3. GK-DEVS: Geometric and Kinematic DEVS.

2MB Sizes 0 Downloads 180 Views

Recommend Documents

Stokes theorem in Geometric Algebra formalism.
Jul 21, 2009 - 2.5 Expansion of the curl and volume element product . ... As evident in equation (1) a metric is required to define the dot product. If an affine ...

Where's the orange? Geometric and extra-geometric ...
Jul 13, 2000 - degree of (geometric) topological enclosure of the located object by the reference object .... The child's role was to watch video scenes on a computer and tell a blindfolded .... the puppets would be hiding the objects and that it was

Where's the orange? Geometric and extra-geometric ...
Jul 13, 2000 - on other objects that were either the same or different (e.g. an apple on .... located object (e.g. an apple on top of other apples in a bowl), in was ...

Chapter 5 Density matrix formalism
In chap 2 we formulated quantum mechanics for isolated systems. In practice systems interect with their environnement and we need a description that takes this ...

Graded Lagrangian formalism
Feb 21, 2013 - and Euler–Lagrange operators, without appealing to the calculus of variations. For ..... Differential Calculus Over a Graded Commutative Ring.

pdf-022\formalism-and-historicity-models-and-methods-in-twentieth ...
... In Twentieth-Century Art (October Books). Page 3 of 6. pdf-022\formalism-and-historicity-models-and-methods-in-twentieth-century-art-october-books.pdf.

pdf-022\formalism-and-historicity-models-and ...
Try one of the apps below to open or edit this item. pdf-022\formalism-and-historicity-models-and-methods-in-twentieth-century-art-october-books.pdf.

Qualitative Verification of Finite and Real-Time DEVS ...
Moon Ho Hwang. Arizona Center for Integrative Modeling & Simulation ...... attempts to occupy a station (let's call it A) at the same time, the station prior to A (let's ...

AKSZ–BV Formalism and Courant Algebroid-Induced ... - Springer Link
DMITRY ROYTENBERG. Utrecht University, P. O. Box 80010, NL-3508 TA Utrecht, The Netherlands. e-mail: [email protected]. Received: 18 October 2006; ...

Formalism in Entrepreneurship Research
... command of the tools that are respected and accepted in the other social ... Several other characteristics of good theory, however, are not enhanced by .... Music appreciation is given as an example; the more time one spends listening to.

First-order formalism and dark energy
Dec 27, 2005 - directly as possible, and we illustrate the main results with ex- amples of current interest to modern cosmology. Models for FRW cosmology with ...

A Hierarchical Goal-Based Formalism and Algorithm for ...
models typically take a large amount of human effort to create. To alleviate this problem, we have developed a ... and Search—Plan execution, formation, and generation. General Terms. Algorithms ...... data point is an average of 10 runs. There are

Formalism in Entrepreneurship Research
and who assigned them a bewildering variety of functional roles (Baretto 1991). .... describe and define general equilibrium, it had the unintended consequence ...

Dynamics and the Orientation of Kinematic Forms in ...
Another illustration of this problem is Todd's (1983) attempt to .... In G. E. Stelmach & J. Requin (Eds.), Tutorials in motor behavior (pp. 199-112). Amsterdam: ...

fundamentals of geometric dimensioning and tolerancing pdf ...
fundamentals of geometric dimensioning and tolerancing pdf download. fundamentals of geometric dimensioning and tolerancing pdf download. Open. Extract.

Farmer, Geometric Series, Descartes, and the Fundamental ...
Farmer, Geometric Series, Descartes, and the Fundamental Theorem of Calculus.pdf. Farmer, Geometric Series, Descartes, and the Fundamental Theorem of ...

GEOMETRIC KNOT SPACES AND POLYGONAL ...
part of a unique square face corresponding to the order- ) sequence of index switches in which ..... or equivalently ¡ by completing squares and solving for 6 ©.

A Reachable Graph of Finite and Deterministic DEVS ...
Toi, H. (1992). An implementation of three algorithms for timing verfication based on automata emptiness. In Proceedings of the 13th IEEE Real-Time Systems.

Qualitative Verification of Finite and Real-Time DEVS ...
Mar 26, 2012 - 4 Reachability Graph of FRTDEVS ... FRTDEVS. Reachability Graph. Verification ... The infinite length observation language of G is denoted by.

A Reachable Graph of Finite and Deterministic DEVS Networks
Arizona Center for Integrative Modeling and Simulation,. Electrical and Computer Engineering Department,. The University of Arizona, Tucson, AZ 85721, USA.