MATLAB & Simulink Integration with Data Distribution Service (DDS)

Feeding test and simulation systems with operational real-time data

Data Distribution Service and MATLAB Synergy 

The Data Distribution Service (DDS™) technology is a middleware platform made of a set of standard APIs and Interoperable protocols to build data-centric systems. This open technology is under the governance of the international standards consortium (OMG®), Object Management Group®.

With DDS, Data and their associated Quality of Services are the only contract that bound and integrate distributed applications together. Data can represent system States, Commands or Replies, Video and Audio streams, Documents and messages.

From that perspective, DDS helps building decoupled and flexible distributed architectures where Applications do not have to expose their location, their APIs, their internal behavior nor need to be active and alive at the same time. With DDS, the decoupling is bidimensional, it happens both in Space and Time.
This disruptive innovation provides, SecureLow-latency and Ultrahigh throughput data exchange rates. Furthermore, it provides extreme Reliability, automatic Discovery and Ultra-scalability features that business and mission-critical Internet of Things (IoT) applications need.

DDS shares the Right data at the Right place at the Right time, Every time, in a completely decoupled way.

Conceptually, DDS builds a distributed Global Data Space where applications that produce and consume data can share it in Real-time and Fault-tolerant ways. DDS guarantees exceptional deterministic behaviors, while providing an unparalleled level of reliability, security and performance.

Over the last decade, it has been proven that DDS is the only technology that covers a wide range of application spectrums. It spans across the board, from embedded systems with extreme hard Real-time constraints to System of System, IIoT (Industrial Internet of Things) or at the intercontinental scales, including Air Traffic Control, Combat management, Scada Command and Control Systems, and many others. This technology is also deployed in Smart Cities, Smart Factories, Smart Grids, Software Defined Networks, Robotics, Healthcare and Medical devices, Transportation and Automotive markets. 

Vortex DDS® is the market leader of DDS technology. Vortex DDS® offers both the middleware platform for intelligent data sharing as well as the required productivity tooling to Develop, Test, Tune, Deploy and Monitor the DDS based applications, everywhere and in every circumstance. Over Local Area, Wide Area, Low bandwidth, Ad-hoc, Mobile Networks or over the scale of the Internet.

On the other hand, MATLAB® is ubiquitously used in numerical, scientific and industrial computing.  The matrix-based MATLAB language expresses easily computational mathematic concepts. Its Built-in graphics make it easy to visualize and gain insights from data. A vast library of prebuilt toolboxes allows you to build complex algorithms in your specific domain. You can run your analysis on larger data sets and scale up to clusters and clouds. MATLAB code can be integrated with other languages and technologies including Vortex DDS, enabling you to feed your applications and algorithms with Real-time data from your production systems and deploy them on the Edge or in the Cloud.

 Similarly, Simulink® is a modelling tool with block diagram environment for multi-domain simulation and Model-Based Design. It supports system dynamics simulation, system-level design, automatic code generation, and continuous test and verification of embedded systems. Simulink provides a graphical editor, customizable block libraries. It is integrated with MATLAB® as well as Vortex DDS, enabling you to represent and model the Key DDS computational entities and incorporate MATLAB algorithms into one model. Subsequently, you can generate the code and export simulation results to MATLAB for further analysis or spread them through Vortex DDS in the DDS Global Data Space.

Vortex DDS®, MATLAB® and Simulink® are now fully integrated enabling you to design and develop a wide range of advanced products, including automotive systems, defense, aerospace flight control and avionics, telecommunications, industrial machinery, medical devices, and other electronic equipment.  They are your fundamental tools and platforms for your research and development.

Simulink Integration with Vortex DDS

The Vortex DDS product comes with a free of chargeDDS-Simulink Integration Module. The DDS-Simulink Integration Module provides a dedicated building block library to model how the DDS interacts in a Simulink Model.  AS shown in Figure 1, each DDS entity, such as Publishers/Subscribers, Readers/Writers and Topics is represented by a dedicated block in the Simulink model.

<br />Figure 1: Vortex DDS integration with Simulink

Figure 1: Vortex DDS integration with SimulinkFurthermore, each DDS block has an associated QoS profile that can be tuned and refined to control the behavior of the underlying DDS entity.
Simulink data is represented in buses whose types need to map with DDS datatypes. Therefore, sending Simulink data to DDS requires a conversion from Simulink types to DDS types. Simulink buses will be mapped to DDS topic types and vice versa. The user can generate or create the Simulink bus definitions by either generating them from an IDL file, or by using the Simulink bus editor.

<br />Figure 2: Mapping Data Types using Simulink Bus Editor

Figure 2: Mapping Data Types using Simulink Bus EditorIf required, you can filter or query the data using the DDS SQL92 query language as shown in the figure 3.

<br />Figure 3: Query definition using Vortex DDS Simulink Integration Module

Figure 3: Query definition using Vortex DDS Simulink Integration ModuleOnce the key DDS building blocks and datatypes are defined and associated to DDS topics, the user can wire and interconnect the DDS building blocks together including Simulink native modelling blocks such as Math function, Time function or Simulink Display blocks to build the complete simulation module. The user can then run the simulation as depicted in the figure below.

<br />Figure 4: Vortex DDS Publisher and Subscriber Models integration with Simulink

Figure 4: Vortex DDS Publisher and Subscriber Models integration with SimulinkOnce your model has been validated via simulation mode, you are ready to generate and compile (or cross compile) the associated code of your models. The Vortex DDS Simulink Integration Module interacts with Simulink Coder to generate the corresponding C code from the DDS building blocks. Once compiled your simulation can run on your selected target in a distributed way via DDS.

The resulting simulation model can now communicate with any other DDS application, either to propagate the results of the simulation over the network or to feed the simulation model with real-time data from the field. 

Next section explains how instances of MATLAB Vortex DDS classes can be created in MATLAB and interact with DDS entities as show in the next section.

MATLAB Integration with Vortex DDS

The DDS MATLAB Integration provides users with DDS MATLAB classes to model DDS communication using the MATLAB language.
Typically, during the development phase users need to:

  1. Define a DDS Data model using the standard OMG IDL data definition language.
  2. Translate the DDS Data model into MATLAB DDS entity classes (e.g Topic classes).
  3. Code the MATLAB program using the MATLAB API for Vortex DDS.

These steps are summarized in code snapshot below:

<br />Figure 5: MATLAB based Pub Sub DDS Applications

Figure 5: MATLAB based Pub Sub DDS ApplicationsThe MATLAB API for Vortex DDS support all the DDS capabilities in term of QoS, data filtering and querying.  


With Vortex DDS you can achieve system Integration including MATLAB / Simulink based applications and build a Widely Distributed Global Data Space. By doing so, you can effectively unify your Test and Simulation frameworks.

The Global Data Space will handle and manage in Real-time, without a single point of failure, all your valuable data taking into account its semantic, QoS, type, content and format.

 Make your simulation models interact over Vortex DDS and get the benefits out of analyzing and interacting with real-time data over MATLAB / Simulink.

<br />Figure 6: The Global Data Space integrating and streaming MATLAB and Simulink data

Figure 6: The Global Data Space integrating and streaming MATLAB and Simulink dataSuch integration technology will help you build your situation awareness layer on top of your Global Data Space to control and monitor your system and create added value services to your end users at minimum cost.

If you would like to learn more about the MATLAB – Simulink Integration with Vortex DDS, download our white paper.

For any inquiries about Vortex DDS, please contact us here.

Ramzi Karoui
Ramzi Karoui

Product Manager at ADLINK Technology