<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Design Speci cation of Cyber-Physical Systems: Towards a Domain-Speci c Modeling Language based on Simulink, Eclipse Modeling Framework, and Giotto</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Muhammad Umer Tariq</string-name>
          <email>m.umer.tariq@gatech.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jacques Florence</string-name>
          <email>jacques.florence@gatech.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marilyn Wolf</string-name>
          <email>marilyn.wolf@gatech.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Georgia Institute of Technology</institution>
          ,
          <addr-line>Atlanta</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we propose a domain-speci c modeling language for specifying the design of cyber-physical systems. The proposed domain-speci c modeling language can capture the control, computing, and communication aspects of a cyber-physical system design in an integrated manner. The concrete syntax of the proposed domainspeci c modeling language has been implemented as an extension of standard blocks available in Simulink. The meta-model for the proposed domain-speci c modeling language has been de ned using the Ecore meta-modeling language, which was originally developed as a part of Eclipse Modeling Framework project. We have also implemented an initial version of a parser that converts Simulink models, employing the proposed domain-speci c modeling language, into corresponding Eclipse Modeling Framework instance models, which can then serve as input to model transformation tools. The proposed domain-speci c modeling language builds on the concepts introduced by Giotto programming paradigm for platform-independent speci cation of control law, implemented by the controller in a cyber-physical system.</p>
      </abstract>
      <kwd-group>
        <kwd>Model-driven development</kwd>
        <kwd>cyber-physical systems</kwd>
        <kwd>domainspeci c modeling language</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Embedded control systems consist of a physical plant being controlled by a
feedback control algorithm, executing on an embedded computing platform. Typical
examples of embedded control systems include automotive and avionics.
Development of embedded control systems typically involves the following steps:
requirements speci cation, control design and analysis, embedded design and
analysis, and implementation. Model-driven development paradigm has been
successfully applied to the eld of embedded control systems through the de
nition of appropriate domain-speci c modeling languages (DSMLs) for di erent
development steps of embedded control systems and appropriate model
transformations among these DSMLs. Figure 1 shows the DSML and analysis tools
used for each development step of embedded control system.</p>
      <p>Last couple of decades have witnessed a dramatic decrease in the cost of
sensing, communication, and computation technologies. This phenomenon has
enabled the development of a new breed of embedded control systems that are
much larger in scale, resulting in non-guaranteed wide-area communication
subsystems. Moreover, these systems have longer lifespans and are more open in
nature, resulting in the need for online recon guration and maintenance. Some
examples of this new breed of embedded control systems are smart electric grids,
smart irrigation networks, and vehicular networks. Design techniques and tools
available in the domain of traditional embedded control systems cannot be
directly applied to this new breed of embedded control systems. The eld of
cyberphysical systems aims to address these issues by rethinking the abstractions
involved in the development of embedded control systems. In particular, the eld of
cyber-physical systems emphasizes the co-design of control, communication, and
computation aspects of a system. As a result, the development steps for
cyberphysical systems are requirements speci cation, cyber-physical system design
(incorporating the co-design of control and computation), and implementation.</p>
      <p>Figure 2 shows the development steps of a cyber-physical system (CPS) and
analysis tools required at each of these steps. However, in order to develop a
cyber-physical system according to model-driven development paradigm, the
DSMLs used to specify the design of embedded control systems are not su cient.
An appropriate DSML for CPS design speci cation must be able to capture the
control, communication, and computation aspects of a CPS design. Moreover,
an appropriate DSML for CPS design speci cation must independently convey
the characteristics of a CPS computing platform as well as the control law
implemented on that computing platform. The meta-model for this DSML can
then be used to de ne model transformations that convert a CPS design
specication into appropriate input for analysis tools (such as simulation and formal
veri cation tools) as well as executable code for implementation platforms.</p>
      <p>
        In this paper, we propose a DSML for CPS design speci cation. The
proposed DSML is capable of capturing the control, communication, and
computation aspects of a CPS design, as it provides blocks to represent physical system,
cyber system, and cyber-physical interface involved in a cyber-physical system.
The proposed DSML builds on the concepts introduced by Giotto programming
paradigm [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] in order to specify the control law, executed by the embedded
controller of CPS, in a platform-independent manner. Since Simulink (combined
with auxiliary State ow and Simscape blocks) has become a defacto standard
in the domain of embedded control system, we chose to implement the concrete
syntax of the proposed DSML as an extension of standard blocks available in
Simulink. The abstract syntax of the proposed DSML has been de ned using
an Ecore-based meta-model. Ecore meta-modeling language was originally
developed as a part of Eclipse Modeling Framework (EMF) project. We have also
implemented an initial version of a parser that converts Simulink models,
employing the proposed DSML, into corresponding EMF instance models, which
can then serve as input to model transformation tools. Figure 3 shows the
envisioned model-driven development toolset for CPS based on the proposed DSML.
      </p>
      <p>The rest of the paper is organized as follows. In Section 2, we present a brief
review of the component technologies involved in the development of DSML,
proposed in this paper. In Section 3, we present the details of the proposed</p>
      <p>DSML for CPS design speci cation. In Section 4, we outline some related work.
In Section 5, we present the conclusion.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Component Technologies</title>
      <p>In this section, we brie y review the technologies involved in the de nition and
implementation of the proposed DSML for CPS design speci cation.
2.1</p>
      <sec id="sec-2-1">
        <title>Simulink</title>
        <p>Simulink, developed by MathWorks, is a simulation and model-based design tool
that provides a graphical editor for specifying a model as a set of hierarchical
block diagrams. Simulink is often used in conjunction with some auxiliary tools
that provide specialized types of blocks to be used in Simulink block diagram.
Two important examples of such auxiliary tools are State ow and Simscape.
State ow allows the users to model decision logic based on the state machine
and ow chart formalisms. Simscape provides fundamental building blocks from
various domains (such as electrical, mechanical, and hydraulic) that can be
combined to model a physical plant.</p>
        <p>Simulink has become a defacto standard in the eld of embedded control
systems. It is not only used to simulate and analyze the proposed designs, but
various model transformations have been de ned to generate executable code from
Simulink models for various embedded platforms. Therefore, we have chosen to
develop the concrete syntax of the proposed DSML for CPS design speci cation
as an extension of the standard blocks available in Simulink toolset.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Eclipse Modeling Framework</title>
        <p>
          Eclipse is an open-source software project, aimed at providing a platform that
can be reused for the development of integrated development environments
(IDEs). Eclipse is divided into numerous top-level projects such as Eclipse Project,
Modeling Project, Tools Project, and Technology Project [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. Eclipse Project is
the core project that provides a generic framework for tools development and a
Java IDE, built using this generic tools development framework. The Modeling
Project has served as the focal point for the implementation of model-driven
development technologies under the Eclipse project [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
        </p>
        <p>At the core of the Eclipse Modeling Project is Eclipse Modeling Framework
(EMF) and all the other model-driven development technologies (such as
modelto-model transformations and model-to-text transformations) have been built on
top of EMF. At it core, EMF is a framework for de ning a model and generating
Java code from that model. As a part of EMF, Ecore modeling language has been
de ned that can be used to specify the model from which EMF generates a set of
Java classes and interfaces. However, in the model-driven development context,
an Ecore model can also serve as the meta-model of a DSML. We have used an
Ecore-based meta-model to specify the abstract syntax of our proposed DSML
for CPS design speci cation.
2.3</p>
      </sec>
      <sec id="sec-2-3">
        <title>Giotto</title>
        <p>
          Typical development process for an embedded control system requires a
collaboration between control engineer and software engineer. First, a control engineer
models the physical plant, derives the feedback control law, and validates the
controller design through mathematical analysis and simulation. Then, a
software engineer decomposes the computational activities of a feedback controller
into time-constrained software tasks, develops code for these tasks in a
traditional programming language (such as C), and assigns priorities to these tasks
so that they could meet their timing constraints while being scheduled by an
RTOS scheduler. Giotto is a specialized programming language for embedded
control systems that aims to bridge the communication gap between a control
engineer and a software engineer by providing an intermediate level of
abstraction between control design and software implementation [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
        </p>
        <p>
          Giotto program provides a platform-independent description of feedback
controller design in terms of time triggered sensor readings, actuator updates, task
invocations, and mode transitions. Then, a Giotto compiler compiles the Giotto
program onto a speci c computing platform, preserving the functionality as well
as the timing behavior, speci ed by Giotto program. Any CPS design speci
cation must independently convey the computing platform characteristics as well
as the controller design that needs to be implemented on that computing
platform so that this design speci cation can then serve as an input to appropriate
CPS analysis tools. Therefore, our proposed DSML builds on the concepts
introduced by Giotto programming paradigm for platform-independent speci cation
of the control law, implemented by the controller in a cyber-physical system.
Figure 4 reviews the major concepts involved in a Giotto program [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Proposed Domain-Speci c Modeling Language</title>
      <p>In this section, we present the details of the proposed DSML for CPS design
speci cation. The individual elements of the proposed DSML can be divided into
three categories: physical system blocks, cyber system blocks, and cyber-physical
interface blocks. CompoundPhysicalPlant, AtomicPhysicalPlant,
PhysicalSystemParameter and PhysicalLink blocks belong to the physical system blocks. Sensor
and Actuator blocks make up the cyber-physical interface blocks.
ComputingNode, NetworkLink, NetworkRouter, NodePlatform, NodeApplication, Mode, Task,
ModeSwitchLogic, SensorPort, ActuatorPort, InputMsgPort, and OutputMsgPort
make up the cyber system blocks.</p>
      <p>Physical system component of a CPS design can be speci ed by a set of
AtomicPhysicalPlant blocks connected to each other through PhysicalLink blocks.
PhysicalLink blocks represent \ ow of energy" between components of a
physical plant. A set of AtomicPhysicalPlant and PhysicalLink blocks can also be
grouped together into a CompuondPhysicalPlant block. Moreover,
PhysicalSystemParameter blocks are used to identify the elements of a physical plant that
are to be sensed and actuated upon by the cyber system. Cyber-physical
interface of a CPS design is captured by a set of Sensor and Actuator blocks. Each
Sensor and Actuator block is connected to a PhysicalSystemParameter block.</p>
      <p>Cyber aspects of a CPS design include the network topology of
computing nodes, platform characteristics of each computing node, and the application
software executing on each computing node. These aspects can be captured by
connecting a set of ComputingNode, NetworkRouter, and NetworkLink blocks.
Each ComputingNode block must include a NodePlatform and NodeApplication
block. NodePlatform block in turn includes Processor, RTOS, Middleware, and
ApplicationFramework blocks, which allow it the capture the platform
characteristics of a computing node. The NodeApplication block includes a set of
Giotto-inspired blocks that can specify the feedback control algorithm executing
on that computing node in a platform independent manner.</p>
      <p>Concrete syntax of the proposed DSML has been implemented as an
extension to standard blocks available in Simulink. In particular, a new Simulink
library has been developed that provides a Simulink block for each of the
proposed DSML element. We have also used Simulink's mask interface capability
to provide each new Simulink block with a custom look, and a dialog box for
entering element-speci c parameters, such as the bandwidth and delay of
NetworkLink block. Figure 5 shows a Simulink model that speci es a CPS design
using the proposed DSML. Figure 6 shows the internal details of
CompoundPhysicalPlant block. Figure 7 shows the internal details of a ComputingNode
block, which contains a NodeApplication and a NodePlatform block. Figure 8
shows the internal details of NodeApplication block, which consists of a set of
Mode blocks and a ModeSwitchLogic block. Figure 9 shows the internal details of
Mode block, which contains a set of Task blocks. Figure 10 shows the simpli ed
version of the Ecore-based meta-model for the proposed DSML.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Related Work</title>
      <p>
        Integration of Simulink with Giotto has also been pursued in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. However, in
this paper, we address a larger issue of developing an appropriate DSML for
CPS design speci cation. Concepts introduced by Giotto are only used for one
component of the proposed DSML (i.e. the platform-independent speci cation of
a control algorithm executing on a computing node of CPS). Moreover, we also
extend the concepts of traditional Giotto paradigm by introducing the concepts
of InputMsgPort and OutputMsgPort to enable mode transitions based on the
violation of QoS constraints on the communication among computing nodes.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], EMF-based integration of Simulink and EAST-ADL (a modeling
language for automotive embedded systems) has been presented. The approach
presented in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] is targeted to the domain of automotive system. However, we
propose to extend this approach by de ning Ecore-based meta-model for speci
cation languages required at each development step of a cyber-physical system.
In this paper, we proposed a DSML for CPS design speci cation and developed
its meta-model using Ecore.
      </p>
      <p>
        Generic Modeling Environment (GME) is a popular domain-speci c
modeling environment [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. GME supports its own meta-modeling language, MetaGME,
and a graphical concrete syntax of DSMLs. The DSML, proposed in this paper,
could have been implemented using GME as well. However, we chose to
implement the proposed DSML using a combination of EMF and Simulink, because
Simulink has become a defacto standard in the eld of embedded control systems
and the choice of EMF allows us to leverage all the model-based development
tools that have been developed on top of EMF. It must be pointed out that a
transformation between MetaGME and Ecore has been reported in literature [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
As a result, the DSML presented in this paper could be integrated with GME
in the future.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>In this paper, we have proposed a DSML for CPS design speci cation that is
capable of capturing the control, computing, and communication aspects of a
CPS design. The proposed DSML leverages the concepts of Giotto programming
paradigm to ensure that the CPS design speci cation independently conveys the
CPS computing platform characteristics as well as the control law that needs to
be implemented on that computing platform. The abstract syntax of the
proposed DSML has been de ned through an Ecore-based meta-model. The concrete
syntax of the proposed DSML has been implemented as an extension of standard
blocks available in Simulink. We have also implemented an initial version of a
parser that converts Simulink models, employing the proposed DSML, into
corresponding EMF instance models, which can then serve as input to EMF-based
model transformation tools.</p>
      <p>The individual elements of the DSML, proposed in this paper, will be re ned
further in the future based on the experience obtained from di erent case studies.
However, the proposed DSML with the choice of EMF for meta-modeling and
Simulink for concrete syntax can serve as the basis of integrating various
emerging facets of CPS research such as CPS simulation tools, CPS formal veri cation
tools and CPS implementation platforms.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Steinberg</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Budinsky</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paternostro</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Merks</surname>
          </string-name>
          , E.: EMF:
          <article-title>Eclipse Modeling Framework</article-title>
          .
          <string-name>
            <surname>Addison-Wesley</surname>
            <given-names>Professional</given-names>
          </string-name>
          , Boston (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Gronback</surname>
          </string-name>
          , R.C.:
          <article-title>Eclipse Modeling Project: A Domain-Speci c Language Toolkit</article-title>
          .
          <string-name>
            <surname>Addison-Wesley</surname>
            <given-names>Professional</given-names>
          </string-name>
          , Boston (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Biehl</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sjostedt</surname>
            ,
            <given-names>C.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Torngren</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <string-name>
            <given-names>A Modular</given-names>
            <surname>Tool Integration</surname>
          </string-name>
          Approach - Experiences
          <source>from Two Case Studies. In: 3rd Workshop on Model-Driven Tool and Process Integration at the European Conference on Modelling Foundations and Applications</source>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Karsai</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sztipanovits</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ledeczi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bapty</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Model-integrated Development of Embedded Software</article-title>
          .
          <source>Proceedings of the IEEE</source>
          ,
          <volume>91</volume>
          (
          <issue>1</issue>
          ),
          <fpage>145</fpage>
          -
          <lpage>164</lpage>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Henzinger</surname>
            ,
            <given-names>T.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horowitz</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kirsch</surname>
            ,
            <given-names>C.M.:</given-names>
          </string-name>
          <article-title>Giotto: A Time-Triggered Language for Embedded Programming</article-title>
          .
          <source>Proceedings of the IEEE</source>
          ,
          <volume>91</volume>
          (
          <issue>1</issue>
          ),
          <fpage>84</fpage>
          -
          <lpage>99</lpage>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Pree</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stieglbauer</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Templ</surname>
          </string-name>
          , J.:
          <article-title>Simulink Integration of Giotto/TDL</article-title>
          . In: Automotive SoftwareConnected Services in Mobile Networks, pp.
          <fpage>137</fpage>
          -
          <lpage>154</lpage>
          . Springer Berlin Heidelberg (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Emerson</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sztipanovits</surname>
          </string-name>
          , J.:
          <article-title>Implementing a MOF-based Metamodeling Environment using Graph Transformations</article-title>
          .
          <source>In: Proceedings of OOPSLA Workshop on Domain-Speci c Modeling</source>
          , pp.
          <fpage>83</fpage>
          -
          <lpage>92</lpage>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>