COSMIC: A real-time event-based middleware for the CAN-bus

https://doi.org/10.1016/j.jss.2003.12.037Get rights and content

Abstract

The paper describes the event model and the architecture of the COSMIC (COoperating SMart devICes) middleware. Based on the assumption of tiny smart sensors and actuators, COSMIC supports a distributed system of cooperating autonomous devices. COSMIC considers quality of service requirements in the event model and provides an application interface which allows to express the respective temporal and reliability attributes on a high, application related abstraction level. According to the need in most real-time systems, COSMIC supports event channels with different timeliness and reliability classes. Hard real-time event channels are considered to meet all temporal requirements under the specified fault assumptions. The resource requirements for this type of channel are statically assigned by an appropriate reservation scheme. Soft real-time event channels are scheduled by their deadlines, but they are not guaranteed under transient overload conditions. Non-real-time event channels are used for events without any specified timeliness requirements in a best-effort manner. The paper finally presents the layered COSMIC architecture to map the different channel classes to the CAN-Bus.

Introduction

Many control applications are based on distributed devices controlling a physical process. Sensors and actuators connected by a network observe and evaluate aspects of the physical environment and act in response to it. At a first glance, this is not new because distributed sensors and actuators connected by field busses are common in industrial automation since years. However, although sensing and acting is physically distributed in these systems, the logic control of the process still is centralized. The sensors are polled periodically by a central instance, which then calculates new values and set points and eventually disseminates them to dedicated actuators. This is reflected in many respective application level protocols in the field bus area, e.g. CiA, 1999, Profibus, 1999, Noonen et al., 1994 and SDS (1996).

New applications and recent technological developments motivate a new system and control architecture. From a technological point of view, sensors and actuators comprise special purpose hardware (sometimes also mechanical elements) for signal reception and conditioning together with computational elements and a network interface. The smart nodes therefore constitute autonomous entities which allow to capture sensor data at the real-world interface, transform it to a machine readable form and spontaneously disseminate it as a standardized message to the distributed system. Moini (1997) makes the point that “smart sensors are information sensors, not transducers and signal processing elements”. Recently, standardization efforts are expended for such systems by OMG (2001) and by IEEE (Bryzek, 1996). The most interesting and challenging property of these intelligent devices is their ability to spontaneously interact with the overall system. This enables a modular system architecture to control physical processes reactively without the need of a central co-ordination facility. In such a system, multiple different sensors will co-operate to augment perception of the environment and autonomous actuators will co-ordinate actions to increase speed, power and quality of actuation thus forming decentralized sensor and actuator networks.

To ease the interaction of cooperating objects, the system should provide an adequate level of abstraction. The application designer should not be forced to deal with the low-level message passing of the raw field bus. The communication model should reflect the requirements of a control system composed from autonomous active components. This demands for the spontaneous generation and dissemination of events when they are detected at the sensor interface or triggered by internal state changes. A many-to-many communication mechanism is needed to efficiently disseminate sensor data and control information because many entities may be interested in the data supplied by a sensor and multiple sources may disseminate similar information. Finally, to maintain autonomy of components and reduce the side effects of communication, the data transfer should not be coupled with a transfer of control, as it is the general case in client–server interactions (Pereira et al., 2001).

COSMIC supports an event-based communication model. The term “event-based” in this context does not refer to any specific model of synchrony. Events are typed information carriers. They may be spontaneously generated and immediately disseminated triggered by an occurrence in the environment or the system itself. Alternatively, an event may be triggered periodically by a clock and contain the current state of a variable or a previous change of state. Events in COSMIC are disseminated in a publisher/subscriber style. Publisher/subscriber protocols are well known to support spontaneous, many-to-many communication relations and reflect autonomy of communicating entities (Rajkumar et al., 1995, Eugster et al., 2001b, Kaiser and Mock, 1999). COSMIC extends the publisher/subscriber scheme by integrating a real-time event model which reflects that events disseminated in the system may represent real-world events requiring real-time dissemination in the control system. An event is characterized by a context of occurrence which at least is defined by a location and a point in time. Additionally, because the event may represent a time/value entity for which the value changes over time, quality properties which are related to the temporal validity have to be assigned. The context and quality attributes (sometimes called “functional” and “non-functional”) are complementary to the event data. To control the quality of dissemination we introduce the concept of event channels. An event channel is an abstraction of the communication mechanisms. Events can be published to an event channel which then ensures the required dissemination quality.

The paper starts with introducing the notions of events and event channels in Section 2. Section 3 describes the layered COSMIC architecture. Related work is reviewed briefly in Section 4 and conclusions and future work are summarized in Section 5.

Section snippets

Events and event channels

An event may occur in the physical environment or in the computing system. Hence, both, an observation of a real-time entity and a state transition of a variable are uniformly characterized, represented and disseminated as an event. Smart sensors substantially support this view on the system because they encapsulate all low-level computations. On the respective abstraction level they are represented as active objects, taking the roles as publishers and subscribers producing or consuming events,

The COSMIC architecture

Implementing the event model requires to map the abstractions of that model (publisher, subscriber, event type, event instance) to the elements provided by the technical infrastructure of the system such as objects, messages and addresses. More precisely, we can identify publishers and subscribers with application objects, and event instances with messages that are sent over the CAN-Bus (Bosch GmbH, 1991). The respective functionality to perform these mapping in COSMIC is encapsulated in the

Comparison with related work

Our work on an event-based interaction system for embedded systems is inspired by many research efforts in very different areas. Event-based systems in general have been introduced to meet the requirements of applications in which entities spontaneously generate information and disseminate it, e.g., as in Bacon et al., 2000, Meier and Cahill, 2002 and OMG (2000). Intended for large systems and requiring complex infrastructures, these event systems do not consider quality aspects like timeliness

Conclusion

We presented the COSMIC middleware which relies on an event channel model that supports functional and non-functional attributes. The concept of event channels represents a high-level programming interface for real-time communication. It provides the abstractions to ease the programming and enables the programmer to reason about non-functional attributes like temporal and reliability characteristics without being involved in low-level network details. Assuming the coexistence of different event

Acknowledgement

This work has been supported by the European Union’s Information Society Technology Program under contract IST-2000.26031 (CORTEX: Cooperating real-time sentient objects: architecture and Experimental evaluation).

References (37)

  • J. Bacon et al.

    Generic support for distributed applications

    IEEE Computer

    (2000)
  • Bosch GmbH, 1991. CAN Specification version...
  • Bryzek, J., 1996. Introduction to IEEE-P1451: the emerging hardware independent communication standard for smart...
  • CiA, 1993. CAN application layer (CAL) for industrial applications. Published by CAN in...
  • CiA, 1999. Draft Standards 301: CANopen Application Layer and Communication Profile. Published by CAN in Automation,...
  • Davis, R., 1994. Dual priority scheduling: a means of providing flexibility in hard real-time systems. Tech. Rep....
  • Eriksson, C., Thane, H., Gustafsson, M., 1996. A communication protocol for hard and soft real-time systems. In:...
  • Eugster, P., Felber, P., Guerraoui, R., Kermarrec, A.-M., 2001a. The many faces of publish/subscribe. Tech. Rep. DSC...
  • Eugster, P., Guerraoui, R., Damm, C., 2001b. On objects and events. In: Proceedings for OOPSLA 2001,...
  • Führer, T., Muller, B., Dieterle, W., Hartwich, R, Hugel, R., Walther, M., 2000. Time triggered communication on CAN....
  • L.B. Fredriksson

    CAN for critical embedded automotive networks

    IEEE Micro

    (2002)
  • Gergeleit, M., Streich, H., 1994. Implementing a distributed high-resolution real-time clock using the CAN-Bus. In: 1st...
  • Harrison, T.H., O’Ryan, C., Levine, D.L., Schmidt, D.C., 1997. The design and performance of a real-time CORBA event...
  • Kaiser, J., Brudna, C., 2002. A publisher/subscriber architecture supporting interoperability of the CAN-Bus and the...
  • Kaiser, J., Livani, M.A., 1999. Achieving fault-tolerant ordered broadcasts in CAN. In: Third European Dependable...
  • Kaiser, J., Mock, M., 1999. Implementing the real-time publisher/subscriber on the controller area network (CAN). In:...
  • Kim, K., Jeon, G., Hong, S., Kim, T., Kim, S., 2000. Integrating subscription-based and connection-oriented...
  • Kopetz, H., Griinsteidl, G., 1992. TTP––A time-triggered protocol for fault-tolerant real-time systems. Tech. Rep....
  • Cited by (17)

    View all citing articles on Scopus
    View full text