Cyber-Physical Systems(CPSs) are new intelligent systems, which integrate com-puting, communication and control processes. In CPSs, computation process and physi-cal process interact with each other through wired and wireless networks, and CPS will operate the physical entities in cyberspace. This operation should be remote, reliable, real-time, safe, and collaborative. One important feature of CPS is that the system highly depends on real-time communication, and the validity of data is limited by time. The time and space of an event are separate for the most time in real world. Traditional approach for processing information is to handle them in plain sequence, but for huge information in CPS this can not work. Thus, how to realize time and space partition is one of the important key technologies in CPS. The real-time requirements reflect another problem between Computer Science and Control Theory:the requirement models of Computer Science are described in discrete mathematics and the models of Control Theory are con-structed by differential equations; control means to be sensitive to both time and space and the computer only concerned about the realization of the function. These are some essential difference between Computer Science and Control Theory, so how to combine the continuous systems with discrete systems is a great challenge for CPSs designing. All these requirements determine that most existing studies cannot fully meet the require-ments of CPS system design, so a new theoretical model is needed to design a unified CPS system.The Unified Modeling Language (UML) is a de facto industry standard, and is e-volving under the direction of the Object Management Group (OMG). The increasing complexity of real-time and embedded systems (RTES) also requires dedicated solutions. The MARTE Profile adds capabilities to UML for model-driven development (MDD) of RTES. MARTE has been adopted by the OMG and supersedes the existing UML Profile for Schedulability, Performance and Time. MARTE gives a detailed time structure, which is available to cover both logical and chronometric time. However, specification of time-continuous behavior has not been discussed extensively in MARTE. Thus, it is necessary to provide an extension of MARTE for CPS modeling.In this paper, we extend MARTE statechart with hybrid automata, Spatio-Temporal UML statechart(STUML statechart). STUML statecharts use typed variables. In UML, we can only use Integer, String, and Boolean as basic types. In order to describe con-tinuous changes of variables, we extend the data type to Discrete variables, Continuous variables, and Clock variables. Thus, there are four kinds of expressions:Boolean Expres- sions, Action Expressions, Clock Constraint Expressions and Differential Expressions. We introduce CPS event into STUML statecharts. A CPS event records the attributes, generating time and location of the event. Then, a formal definition of STUML statechart is given, including the detailed definition of guard, CPS event, action, activity, invariant. The safe semantics and live semantics are given. The former one is a labeled transition system and the latter one is a live transition system. Moreover, we have also developed a tool for system simulation. With the simulation results, we can use our STUML statechart model in system design and improvement. In the end of the paper, we give an application example of an Automatic Train Protection system (ATP), which shows the specific usage of STUML statecharts. |