statechart modeling and web-based simulation of

0 downloads 0 Views 342KB Size Report
for a three-axis motion control system in the context of e-automation is provided to illustrate the proposed modeling and ... Keywords: Web-based simulation, hybrid dynamic systems, statechart modeling, Java ..... the Remote Client can login to the system by sending a .... Panel (Figure 12) through the data_pipe and plotted.
Journal of the Chinese Institute of Industrial Engineers, Vol. 22 , No. 1 , pp. 19-27 (2005)

19

STATECHART MODELING AND WEB-BASED SIMULATION OF HYBRID DYNAMIC SYSTEMS FOR E-AUTOMATION Jin-Shyan Lee Department of Electrical and Control Engineering National Chiao-Tung University 1001, Ta Hsueh Road, Hsinchu, 30010, Taiwan, R.O.C. Meng-Chu Zhou* Department of Electrical and Computer Engineering New Jersey Institute of Technology, Newark, NJ 07102, USA Pau-Lo Hsu Department of Electrical and Control Engineering National Chiao-Tung University 1001, Ta Hsueh Road, Hsinchu, 30010, Taiwan, R.O.C.

ABSTRACT Web-based simulation of hybrid automation systems has attracted much attention. However, most available modeling approaches usually result in unnatural and complex models as both discrete logic and continuous behavior are involved. Based on the multi-paradigm modeling concept, this paper extends the traditional discrete statechart to model the continuous dynamics in a hierarchical and natural way. Furthermore, a Java-based kernel is developed to implement the simulation of the extended models. An application of Web-based simulation for a three-axis motion control system in the context of e-automation is provided to illustrate the proposed modeling and simulation approach. Keywords: Web-based simulation, hybrid dynamic systems, statechart modeling, Java

1. INTRODUCTION Recently, due to the rapid change in information technology, e-automation has been developed into a very attractive research area [15, 16]. One of the topics in e-automation is the investigation of Web-based simulation because of its importance in the design of distributed automation systems. The deployment of such systems in real-world environments has increased immensely since we entered the Internet era. Web-based simulation represents the connection between the Web and the field of simulation. It is an idea that represents an interest on the part of simulation researchers to exploit the Web technology. Fishwick [10] described several potential impacts of Web technologies on simulation, giving particular attention to three areas: 1) education and training, 2) publications, and 3) simulation programs. The proliferation of Web contents was pictured as a “kind of twenty-first century gold rush.” Hence, simulation researchers and practitioners have to be proactive in defining the relationship of the Web and simulation. The modeling method plays an important role in the Web-based simulation. *

Corresponding author: [email protected]

Most work on system modeling and simulation has mainly focused on either continuous variable systems (CVS) or discrete event systems (DES). The former are typically modeled by differential or difference equations to analyze physical dynamic behavior, while the latter are described based on various frameworks to capture logical and sequential behaviors, such as finite state automata, Petri nets (PN), and max-min algebra [6]. For the Web-based simulation, modeling is a way of representing our knowledge about structure and behavior of systems so as to further answer questions about them. Both of the CVS and DES models are developed to reduce the complexity for presenting real systems. However, in practical applications, most automation systems possess the behavior that shows both the time-driven and event-driven dynamics, thereby leading to so-called hybrid dynamic systems (HDS) or hybrid systems [1-2,19]. During the past decades, HDS modeling and simulation have attracted much attention. Integrating continuous and discrete models is common, and several approaches have been proposed. Liu and Lee proposed a component-based approach implemented in Ptolemy II software environment [17].

20

Journal of the Chinese Institute of Industrial Engineers, Vol. 22, No. 1 (2005)

Demongodin and Koussoulas proposed a differential Petri net to represent the continuous system part and the discrete-event system part of a hybrid system in a collective PN model [8]. Moreover, some commercial software has been developed, such as Simulink with the integration of Stateflow in the MATLAB platform [14], and VHDL-AMS/Verilog-AMS with the extensions of hardware description languages to analog and mixed signals [3]. However, it is very difficult to simultaneously deal with the discrete and continuous variables. Their mathematical backgrounds are completely different: recurrence versus differential equations. Moreover, most of the existing approaches mix the continuous and discrete dynamics into a unified model, such as piece-wise linear systems and hybrid Petri nets [7]. Hence, design engineers can hardly be allowed to use their preferred domain models. Over the years, different engineering domains used various modeling abstractions that best suited the design of particular kinds of systems. Multi-paradigm modeling (MPaM) is based on the premise of giving modelers the most appropriate modeling abstractions for their particular problem domain and integrating heterogeneous modeling techniques to achieve scalable designs [9]. Thus, based on the MPaM concept, this paper proposes a statechart-based approach to modeling the dynamic behaviors of the HDS. The statechart of the standard unified modeling language (UML) [5] is extended to model the HDS with a natural representation. Since the extended statechart modeling accommodates both continuous physical equations and the discrete-event models together based on the MPaM concept, it allows developers to view the continuous and the discrete modeling paradigms in a hierarchical way. With different views of a system, it could be more efficient to work with separate interacting models. Designers can still work in their familiar domain-specific modeling paradigms and the heterogeneity is hidden when large systems are composed. Instead of proposing a simulation tool, this paper presents a statechart-based modeling tool to help system developers to understand and design the system. Recently, the Java programming language became more and more popular in software engineering. Although the proposed hybrid modeling is not restricted to any particular language, we prefer Java as the target language due to its popularity, portability, safety, and built-in support for concurrency and real-time development [4,18,20]. Also, it provides automatic garbage collection for memory management, while C++ requires the programmer to free up unneeded memory. Since Java is suitable for large-scale, multi-threading, and distributed systems, the proper use of Java can simplify the simulation with parallel programming strategies. This work uses Java to implement a

real-time kernel so that the Web-based simulation of the extended statechart models can be directly implemented. To illustrate the proposed modeling and Web-based simulation approach, an application of a three-axis motion control system is provided.

2. STATECHART-BASED MODELING 2.1 Statecharts Statecharts constitute a visual formalism for describing states and transitions in a modular fashion. It extends the classical formalism of finite-state machines and state transition diagrams by incorporating the notions of hierarchy, orthogonality (concurrency), a broadcast mechanism for communication between concurrent components, composition, aggregation, and refinement of states [13]. Formally, a statechart is defined as Statechart = ( E , S , h, c, ∆, A)

(1)

where, E is a finite set of basic events. S is a finite set of state names. h ∈ S → 2 S is the hierarchy function. It defines for each state the set of children of that state. c ∈ S → {PRIM , AND, OR} is the class function. It gives for each state its type: primitive state, AND-state, or OR-state. Primitive states have no children. AND-states consist of two or more substates graphically separated by dashed lines. They introduce concurrency. OR-states contain a finite state machine with one or more substates. ∆ ∈ S → 2 S is the initial state function. It also gives the default substates of a state. A is a finite set of arrows. A state is denoted as a rectangle with rounded corners and a transition is represented as an arrow connecting states. Take Figure 1 as an example, we have a statechart with the elements as follows: E = {Switch on,Switch off,Start Proc-A, End Proc-A,Start Proc-B,End Proc-B}; S = {OFF , ON , Sa, Sb, Idle, Busy}; h(OFF ) = {∅} , h(ON ) = {Sa, Sb} , h( Sa ) = h( Sb) = {Idle, Busy} , h( Idle) = h( Busy ) = {∅} ; c(OFF ) = {PRIM } , c(ON ) = { AND} , c( Sa ) = c( Sb) = {OR} , c( Idle) = c ( Busy ) = {PRIM } ; ∆ = {OFF } and ∆( Sa ) = ∆( Sb) = {Idle} .

Lee et al.: Statechart Modeling and Web-Based Simulation of Hybrid Dynamic Systems for e-Automation

Note that from a global point of view, a statechart can be considered as a macro state which may not be defined in S. Thus, ∆ = {OFF } indicates the initial condition of the statechart is OFF, while ∆ ( Sa ) = ∆ ( Sb) = {Idle} means the initial conditions of state Sa and Sb are both Idle.

Idle

OFF Switch off

Start Proc-A

CV-State

Switch on

Initial state

continuous variables, its corresponding transition is described as an arrow with thick line, which could be recognized as a message pipe. A continuous variable state may be associated with either the physical equations, transfer functions, or a message pipe, as shown in Figure 2. Physical Equations or Transfer Functions

ON Sa

21

Busy

Event with message pipe to transmit continuous variables

End Proc-A

Sb Start Proc-B

Idle

CV-State

Busy

Figure 2. The continuous variable state in the extended statechart.

End Proc-B

Figure 1. A simple statechart.

2.3 Modeling procedure

2.2 Extension to HDS The UML is a recent product generated by the aggregation of previous object-oriented methodologies for software engineers [5]. The statechart of the UML is the primary means for capturing complex dynamic behaviors. It is inherently a language suitable for DES and handles the discrete behavioral representation for real systems. A traditional statechart represents a state machine and the sequences of states together with its responses and actions. Since it is basically developed for DES modeling, in order to capture the continuous dynamics, its extension for HDS modeling is proposed as shown below. Extended Statechart = ( E , S , h, c, ∆, A, f )

(2)

where, f ∈ S → {x(t ), x(k ), X ( L), X ( Z )} . The physical continuous dynamics associated with a state remains as the physical equations, i.e., differential or difference equations, denoted as x(t) or x(k). Also, instead of equations, transfer functions, i.e., Laplace or Z-transfer functions, can be also used, denoted as X(L) or X(Z). When a state changes due to a result of some discrete events, the continuous behavior may also change. In turn, a condition specified on continuously changing variables may also trigger an event for state transitions. To distinguish clearly between discrete and continuous states, the continuous state is represented as a double rectangle with rounded corners. To identify clearly an event for transmitting or receiving

The statechart modeling procedure for the HDS consists of the following steps: 1. Based on the specification, divide the system to several modules. 2. According to these modules, sketch a high-level statechart. 3. For each module, define the discrete states (S), events (E), and then connect the states with the arcs (A) in a logic order. 4. For each state with continuous dynamics, define the associated physical equations (f), transfer functions or other convenient means. 5. Based on ∆, set the initial conditions. Basically, this is a top-down approach for modeling a system in a hierarchical way, i.e., from high-level states to low-level ones, and from discrete behavior to continuous dynamics. In addition, for large-scale systems, Step 1 provides a modular way to handle effectively the complexity. Also, the refinement can be applied to modify the models.

2.4 A simple example Consider a simple example of the circle trajectory generation in a three-axis motion control system. The task is to generate the circular points as the reference commands for the motion controllers. Figure 3 shows the resultant statechart model, including four events and five states. The initial and final states are Ready and Finished, respectively. One state Generating Circle Trajectory has the continuous dynamic behavior, which is modeled as difference

22

Journal of the Chinese Institute of Industrial Engineers, Vol. 22, No. 1 (2005)

equations, for the trajectory points of each axis. During the simulation, the equations can be solved by numerical methods. After the points generated, they are transmitted to the controller through a message pipe. The proposed approach allows one to use the domain-specific primitive models, i.e., differential/difference equations, to capture low-level physical interactions, and then be connected with the high-level statechart in a hierarchical way. Thus, the resultant model can easily lead to a natural description as compared with other approaches [7, 8].

through the constructed socket. Then, the Web Server invokes the Simulation Agent to perform the simulation. Finally, the Java applet displays the simulated results on the Web page iteratively through the constructed socket. Internet Simulation Agent Remote Client

Web Server HTTP request HTTP response (authentication page)

Time HTTP request (Login request)

θ(k)=θ(k-1)+Δθ x(k)= Rcosθ(k) y(k)= Rsinθ(k)

Trajectory Points Generated

z(k)= z(k-1)

write to control_pipe

complete

Ready Generating Circle Trajectory

[Fail] HTTP response (authentication page)

Writing Points to pipe

traceCircle Finished

complete

Figure 3. An example of extended statecharts for generating the circle trajectory.

3. WEB-BASED SIMULATION USING JAVA 3.1 Web-based simulation Web-based simulation is a powerful skill for e-automation. Simulation can give concrete answers to the engineers’ questions in real-time. The sequence diagram [5] of the UML is applied to model client/server interaction in our developed Web-based simulation system. As shown in Figure 4, within a sequence diagram, an object is shown at the top of a vertical dashed line, called the object’s lifeline and representing the life of an object during the interaction. Messages are represented by horizontal arrows as drawn chronologically from the top of the diagram to the bottom. At the first stage, the Remote Client sends a hypertext transfer protocol (HTTP) request to the Web Server. Next, the Web Server sends an HTTP response with an authentication web page, on which the Remote Client can login to the system by sending a request with user/password. The Web Server then invokes a Java servlet to authenticate the user. If the authentication fails, the Java servlet responds with the authentication web page again. If the authentication succeeds, the Java servlet’s response is a simulation Web page with a Java applet. The Java applet first builds a graphical human-machine interface (HMI) and constructs a socket on the specified port to maintain continuous communication with the server. Next, the Java applet sets the system parameters

Check user by Java Servlet Iteration

[Success] HTTP response (simulation page) 1. Build graphic HMI by Java Applet. 2. Build socket-communication. 3. Simulate and display results via socket iteratively.

*set (parameters) return(results)

Figure 4. Interactive modeling with a sequence diagram for the Web-based simulation system.

3.2 Java implementation The system modeling developed in previous stages provides models for the implementation of presented Web-based simulation functions. In this stage, we need to translate information from the statechart models into the code and database structure. This translation is not straightforward. However, there is a close correspondence between Java and UML statechart, and a useful mapping is described in [12]. Java is suitable for the large-scale, multi-threading, and distributed systems, and the proper use of Java can simplify the simulation of parallel strategies. This mapping could be modified and adopted to transform the extended statechart into the Java code. In this paper, a simple Java-based kernel, including a Clock for the tick generation, a Scheduler for the task dispatching, a Task class for the creation of tasks, and a Channel class for the communication between tasks, has been developed for the Web-based simulation. Moreover, reverse engineering aims at analyzing and modeling the target software so that it is easier to understand, maintain, re-engineer, and reuse. This goal can be achieved by producing design models from the software. In this paper, reverse engineering from Java to the extended statechart can be built in the future to help the user to understand different aspects of the software [21].

4. WEB-BASED MOTION CONTROL SIMULATION

Lee et al.: Statechart Modeling and Web-Based Simulation of Hybrid Dynamic Systems for e-Automation In this section, the proposed modeling and simulation will be demonstrated by considering a three-axis motion control system.

4.1 System description

3.

The block diagram of a three-axis motion control system is shown in Figure 5. It is typically a hybrid system, where a discrete-event motion controller supervises three discrete-time servo controllers to independently control three continuous-time servo motors. The servo motor system is modeled as a 2nd-order transfer function and is transformed into the difference equation by using the zero-pole matching with one timer delay for real-time simulation [11]. Each servo controller is implemented with the PID control structure. The time requirement for the present simulation is shown in Figure 6, where the trajectory generation and motor control are time-critical tasks with a 5 ms hard real-time response, and the tracking display are soft real-time tasks with a 50 ms response. Command Event Discrete Event

Discrete Time

Continuous Time

2.

Motion Controller

X-Axis Servo Controller

Y-Axis Servo Controller

Z-Axis Servo Controller

X-axis Motor

Y-axis Motor

Z-axis Motor

Figure 5. The block diagram of the three-axis motion control system.

4. 5.

According to these modules, a high-level statechart has been constructed as shown in Figure 8. It represents the dynamic interactions of the major modules for the overall motion control system. For each module, the discrete states, events, and connecting arcs are modeled, as shown in Figures 9-12. For continuous dynamics, physical equations have been associated with those discrete states which possess continuous behaviors. The initial conditions have also been set in Figures 9-12.

From a user’s point of view, five kinds of button commands are modeled in User Command (Figure 9), which trigger the tracking events of Generating Trajectory (Figure 10) to produce the corresponding trajectory. Since the trajectories of linear and circular motions are continuous variables, Generating Line and Generating Circle Trajectory are modeled as continuous states with algebraic equations. The trajectory is then transmitted to the Motor Control (Figure 11) through the control_pipe, where the control value generation and motor dynamic simulation are modeled as continuous states with difference equations. The control parameters of the PID controller can be adjusted by using UI-PID of User Command. Tracking results are sent to Display Panel (Figure 12) through the data_pipe and plotted on the display panel. Priority Clock

Time-Critical: 5 ms

Time Critical: 5 ms

Generate Trajectory

PIPE

X,Y,Z-Axis Motor Dynamic Simulation with PID Control

Hard real-time

User Command

Display Tracking Results NOT Time-Critical: 50 ms

User Command

High

Scheduler Generating Trajectory

PIPE

Motor Control

Display Panel Soft real-time

Figure 6. The simulation scheme with time requirements.

4.2 Statechart-based modeling Based on the modeling procedure presented in Section 2.3, this section illustrates the statechart modeling as follows. 1. A module diagram has been built as shown in Figure 7. It represents the static structure of the system with timing priority. As mentioned in Section 3.2, Clock and Scheduler are in a simple Java-based kernel. Besides these, there are four modules: User Command, Generating Trajectory, Motor Control, and Display Panel.

23

Low

Figure 7. The modular diagram with priority indicated

24

Journal of the Chinese Institute of Industrial Engineers, Vol. 22, No. 1 (2005) 3-Axis Motion Control

Motor Control

while (true)

MotionCtrl

Task

Initializing Components

k u(k ) = Kpe(k ) + Kd [e(k ) − e(k −1)] + Ki ∑e(i ) i =0

PID.setSP

RT-Kernel

read from control_pipe

while (true)

Clock Time Base=10 ms Sch.resume

Reading Set Point (X,Y,Z)

User Command while (true)

traceLine/Circle, setPID, HOME, REVERSE

Setting Set Point

Generating Control Value

PID. getNewCV

y(k) = (1 + e −T/10 )y(k − 1) − e −T/10 y(k − 2) + 10(1 − e −T/10 )u(k − 2)

Motor.pos

Trajectory Points

Simulating Motor Dynamics

Scheduler

write to data_pipe

Tracking Results Writing Results to Pipe to Display Panel. data_pipe

Task.setPID

Task.suspend/resume, 5 ms

Kp, Ki, Kd Setup 50 ms

Generating Trajectory

PID Motor Control

control_pipe

Display Panel

Figure 11. The statechart of PID Motor Control

data_pipe

Figure 8. The high-level statechart Display Panel Output Display

User Command UI- Line

to Tracking.traceLine(X,Y,Z)

“EXECUTE” Button_OFF

Push

“HOME” Button_OFF

Push

“EXECUTE” Button_ON

UI- Circle

“HOME” Button_ON

Axis-Display repaint

to Tracking.traceCircle(X,Y,Z,R)

“EXECUTE” Button_OFF

Push

“REVERSE” Button_OFF

Push

to Tracking.traceLine(0,0,0)

while (true)

“EXECUTE” Button_ON

to Tracking.changeDir “REVERSE” Button_ON

Reading X-Axis Value

Plotting X-Graphic

Reading Y-Axis Value

Plotting Y-Graphic

Reading Z-Axis Value

Plotting Z-Graphic

read from data_pipe

UI- PID

to Task.setPID(Kp,Ki,Kd)

“ADJUST” Button_OFF

Push

while (true)

“ADJUST” Button_ON

Tracking Results

Output displayed

Plane-Display repaint

Figure 9. The statechart of User Command

Generating Trajectory

Reading X-Y Value

Plotting X-Y Plane

Reading Y-Z Value

Plotting Y-Z Plane

Reading X-Z Value

Plotting X-Z Plane

while (true)

Tracking x(k)= x(k-1)+Δx y(k)= y(k-1)+Δy z(k)= z(k-1)+Δz

traceLine

Figure 12. The statechart of Display Panel

Generating Line Trajectory

4.3 Web-based simulation using Java

complete θ(k)=θ(k-1)+Δθ x(k)= Rcosθ(k) y(k)= Rsinθ(k) z(k)= z(k-1)

Trajectory Points Generated

complete traceCircle

Generating Circle Trajectory

changeDir CW → CCW CCW → CW

write to control_pipe Writing Points to pipe

Trajectory Points to Task. control_pipe

Figure 10. The statechart of Generating Trajectory

In this application, the classes created in Java programming are described in Figure 13. Figure 14 shows the Java-implemented HMI, which is composed of the display panel and command buttons with parameter fields. In the display panel, the three upper screens show the tracking trajectory of X-Y, Y-Z, and X-Z planes, respectively, while the lower screens show the position of each axis. The command buttons are used for tracing a linear command, backing to the home position, tracing a circular command, reversing circle direction, and adjusting control parameters for each axis. Remote clients can input the desired values to the parameter fields and then push the corresponding

Lee et al.: Statechart Modeling and Web-Based Simulation of Hybrid Dynamic Systems for e-Automation buttons to control the motion systems. A Java-based simulation engine has been developed to simulate the systems with 10 ms time base. Figure 14 also shows the circular motion tracking with the (0,0,40) center and 60 mm radius. This application builds a Web-based simulation engine for the three-axis motion control. Engineers can use this to obtain their corresponding answers in real-time.

25

Further work includes the study and comparison of the extended statechart from a theoretical point of view, the performance evaluation of Web-based simulation, the design of a friendlier user interface, and the development of a powerful tool for automatic code generation.

ACKNOWLEGEMNT This work was in part supported by the National Science Council, ROC, under Grant NSC 92-2917-I-009-005, the Ministry of Education, ROC, under Grant Ex-91-E-FA06-4-4, and the China National Science Foundation under Grant 60228004.

REFERENCES 1.

Antsaklis, P. J. and A. Nerode, “Hybrid control systems: An introductory discussion to the special issue,” IEEE Transactions on Automatic Control, 43(4), 457-460 (1998).

2.

Antsaklis, P. J. and M. D. Lemmon, “Introduction to the special issue,” Special issue on hybrid systems, Journal of Discrete Event Dynamic Systems, 8(2), 101-103 (1998).

3.

Bakalar, K. and E. Christen, VHDL 1076.1: Analog and Mixed Signal Extensions for VHDL, Technical Report, IEEE, NJ, USA (1999).

4.

Bertolissi, E. and C. Preece, “Java in real-time applications,” IEEE Transactions on Nuclear Science, 45(4), 1965-1972 (1998).

5.

Booch, G., J. Rumbaugh, and I. Jacobson, The Unified Modeling Language User Guide, Addison-Wesley, Reading, MA, USA (1998).

6.

Cassandras, C. G. and S. Lafortune, Introduction to Discrete Event Systems, Kluwer, Boston, MA, USA (1999).

7.

David, R. and H. Alla, “Petri nets for modeling of dynamics systems— A survey,” Automatica, 30(2), 175-202 (1994).

8.

Demongodin, I. and N. T. Koussoulas, “Differential Petri nets: Representing continuous systems in a discrete-event world,” IEEE Transactions on Automatic Control, 43(4), 573-578 (1998).

9.

Engell, S. and P. J. Mosterman, “Guest editorial: Computer automated multiparadigm modeling (CAMPAM),” IEEE Transactions on Control Systems Technology, 12(2), 221-222 (2004).

Figure 13. Classes created in Java programming

Figure 14. A Java-based human-machine interface

5. CONCLUSION To perform Web-based simulation of hybrid dynamic systems, this paper has presented a modeling and implementation approach by using statechart and Java. The traditional discrete statechart is extended to capture the continuous behaviors, and a Java-based kernel has been developed to implement the extended models. An application of a three-axis motion control system is successfully implemented to illustrated our proposed approach.

10. Fishwick, P. A., “Web-based simulation: some personal observations,” Proceedings of the 28th Conference on Winter Simulation, Coronado, CA, USA, 772-779 (1996). 11. Franklin, G., F. J. D. Powell, and M. L. Workman, Digital Control of Dynamic Systems, Addison-Wesley, Menlo Park, CA, USA, 200-202 (1998). 12. Greenfield, J., Unified Modeling Language/Enterprise JavaBeans (UML/EJB) Mapping Specification. Rational Software Corporation Document, USA (2001).

26

Journal of the Chinese Institute of Industrial Engineers, Vol. 22, No. 1 (2005)

13. Harel, D., “Statecharts: A visual formalism for complex systems,” Science of Computer Programming, 8, 231-274 (1987). 14. Harman, T. and J. Dabney, Mastering Simulink 4, Prentice Hall, Englewood Cliffs, NJ, USA (2001). 15. Huang, G. Q. and K. L. Mak, “Web-integrated manufacturing: recent developments and emerging issues,” Special issue on Web-integrated manufacturing, International Journal of Computer Integrated Manufacturing, 14(1), 3-13 (2001). 16. Huang, H. P., “Guest editorial: Focused section on Internet-based manufacturing systems,” IEEE/ASME Transactions on Mechatronics, 6(4), 355-355 (2001). 17. Liu, J. and E. A. Lee, “A component-based approach to modeling and simulating mixed-signal and hybrid systems,” Special issue on computer automated multi-paradigm modeling, ACM Transactions on Modeling and Computer Simulation, 12(4), 343–368 (2002). 18. Mello, R. F. and C. E. Moron, “A Java real-time kernel,” Proceedings of the IEEE International Conference on Industrial Electronics, San Jose, CA, USA, 728-734 (1999). 19. Morse, A. S., C. C. Pantelides, S. S. Sastry, and J. M. Schumacher, “Introduction to the special issue on hybrid systems,” Automatica, 35(3), 347-348 (1999). 20. Nilsen, K., “Real-time programming with Java technologies,” Proceedings of the IEEE International Symposium on Object-Oriented Real-Time Distributed Computing, Magdeburg, Germany, 5-12 (2001). 21. Systä, T., “On the relationships between static and dynamic models in reverse engineering Java software,” Proceedings of the Working Conference on Reverse Engineering (WCRE99), Atlanta, Georgia, USA, 304-313 (1999).

ABOUT THE AUTHORS Jin-Shyan Lee received the B.S. degree in mechanical engineering in 1997 from National Taiwan University of Science and Technology, Taipei, Taiwan, R.O.C., and the M.S. and Ph.D. degree in electrical and control engineering from National Chiao-Tung University, Hsinchu, Taiwan, R.O.C, in 1999 and 2004. From July 2003 to June 2004, he has been a visiting scholar as a Research Associate in the Department of Electrical and Computer Engineering, New Jersey Institute of Technology, Newark, USA and supported by National Science Council of Taiwan, R.O.C. His research work has led to a number of papers in journals and international conference proceedings. His current research interests include Internet-based monitoring and control, discrete event systems, supervisory control, hybrid systems, factory automation, and intelligent transportation systems.

Meng-Chu Zhou received his B.S. degree from Nanjing University of Science and Technology, M.S. from Beijing Institute of Technology, and Ph. D. from Rensselaer Polytechnic Institute. He joined New Jersey Institute of Technology (NJIT) in 1990, and is currently Professor of Computer Engineering. His interests are in Petri nets, semiconductor manufacturing, and lifecycle engineering. He has 200+ publications including 4 books and 60+ journal papers. He is Associate Editor of IEEE Transactions on Systems, Man and Cybernetics and IEEE Transactions on Automation Science and Engineering. He Co-Chaired 2003 IEEE International Conference on System, Man and Cybernetics and 2004 IEEE International Conference on Networking, Sensing and Control. He was the recipient of CIM University-LEAD Award by Society of Manufacturing Engineers, Perlis Research Award by NJIT, Humboldt Research Award for US Senior Scientists, Leadership Award by Chinese Association for Science and Technology-USA. He is Fellow of IEEE. Pau-Lo Hsu received the B.S. degree from National Cheng Kung University, Tainan, Taiwan, R.O.C., in 1978, the M.S. degree from the University of Delaware, Newark, in 1984, and the Ph.D. degree from the University of Wisconsin, Madison, in 1987, all in mechanical engineering. Following two years of military service in King-Men, he was with San-Yang (Honda) Industry during 1980–1981 and Sandvik (Taiwan) during 1981–1982. In 1988, he joined the Department of Electrical and Control Engineering, National Chiao-Tung University, Hsinchu, Taiwan, R.O.C., as an Associate Professor. He became a Professor in 1995. During 1998–2000, he served as the Chairman of the Department of Electrical and Control Engineering. His research interests include mechatronics, CNC motion control, servo systems, network-based control systems, and diagnostic systems.

Lee et al.: Statechart Modeling and Web-Based Simulation of Hybrid Dynamic Systems for e-Automation

電子自動化中混合動態系統之狀態圖建模與網路模擬 李俊賢 國立交通大學電機與控制工程學系 30010 新竹市大學路 1001 號 周孟初* 美國新澤西理工學院電機與電腦工程學系 徐保羅 國立交通大學電機與控制工程學系 30010 新竹市大學路 1001 號

摘要 近年來,以網路為基礎的混合動態系統之即時模擬已經吸引許多學者的研究。然而, 由於連續變數與離散事件的動態行為同時混合在整體系統中,目前的建模方法會導致 更加複雜且不易了解的模型。本文以多維的建模方式為基礎,延伸傳統的離散狀態圖, 並利用階層式的架構,同時將連續變數的動態行為塑造於離散事件的系統模型之中。 接下來,我們利用爪哇技術所發展出來的核心程式系統來實現上述的模型,執行以網 路為基礎之系統模擬。本文最後以一個電子自動化中,在三軸的運動控制系統上的應 用來說明我們提出的建模與模擬方法。 關鍵詞:網路模擬,混合動態系統,狀態圖建模,爪哇語言 (*聯絡人: [email protected])

27