Simulating M2M System Communication

Building machine-to-machine embedded systems can be complex and error-prone without simulating the communication among devices.

Maple and MapleSim can effectively model communications among processors controlling different automotive subsystems.


Fig2 MapleSim Maple and MapleSim can effectively model communications among processors controlling different automotive subsystems.

As the Internet of Things (IoT) ramps up and millions of devices become connected to the Internet, there is also a push to enable communication among all types of devices available on the Internet. These devices include process control systems, power line communication (PLC) devices, precision machinery, and various types of infrastructure.

For example, imagine the system of monitors and controllers it will take to control driverless cars on a highway—car sensors and control systems, manufacturing systems, traffic signals, wireless access points, systems working with Big Data, and likely even satellite monitoring. All of these components need to communicate with one another, accept and process data, and provide feedback to a variety of control systems.

Simulating these systems is a challenge, but it’s necessary to understand the behavior of the system and how to make it better before actually building it. They consist of many hardware components, multiple software packages including different operating systems, different programming languages, and different types of connections. Most of the IoT for specific applications will operate on small network segments for specific purposes, but some will connect with hundreds, thousands or even millions of other devices.

Machine to Machine, Defined

Simulation is an essential element of building an IoT network. These networks are starting to become complex and ubiquitous, and the communication among these systems can be unpredictable without a lot of modeling. Many of the technologies and applications are new, necessitating creative design strategies and good technical decisions.

Machine-to-machine, or M2M, is a type of IoT design that typically involves no human interaction. It might involve feedback systems between engine and braking actions in an automobile, or control systems monitoring temperatures and chemical reactions in industrial plants. These devices have performed relatively simple, single-function tasks in the past, but are now being called upon to operate more autonomously, in conjunction with other devices.

Because many of these systems have at least soft real-time requirements, getting the timing right is a critical part of design. If engineers had to physically build it to do so, tweaking the design could take significant time and cost a great deal. Thus, simulation is increasingly the starting point to the design and implementation of these embedded networks.

Simulating Processors and Communication

System parameters and design goals may require simulating the different types of processors and processing at the hardware level. In some cases, this could be done as hardware-in-the-loop (HIL) simulation. According to Jim Tung, MATLAB Fellow at MathWorks, communication between devices can occur in multiple ways: “Ethernet, both wired and wireless, Bluetooth or LTE.” During the design process, engineers are often looking at tradeoffs between cost and performance want to simulate different communications options.

Tools such as MathWorks Simulink provide a robust method of simulating both devices and communication between those devices. Simulink provides a means of executing a MATLAB model to determine the operating characteristics of a design.

For those interested in performing detailed communications simulations, MathWorks also offers downloadable toolboxes for specific media and protocols. These include the signal processing, radio frequency (RF), communications system and wavelet toolboxes—enabling modeling and simulating different types of communications to be done at a high level of abstraction.

Maplesoft’s Maple and MapleSim also enable engineers and system designers to create communications designs. The two work together—Maple to produce formal analytical models based on mathematical representations of system behavior, and MapleSim to execute those models as a part of a simulation.

The result is a combination of mathematical tools for engineers with the ability to build and execute models of complex real world systems. While Maple is used for a lot of designs and simulations within the automotive industry, these tools can be applied to any engineering problem that requires sophisticated mathematics.

In support of HIL simulations as well as other types of integrated simulations, MapleSim offers a large and continually growing array of connectors to other engineering software and hardware systems. It enables engineers to easily connect supporting hardware devices, and simulate the communications activity among them.

Simulating processors is usually necessary only at the most basic level, if hardware isn’t available yet or if the project is at the conceptual phase. Instead, designers are typically able to employ HIL to include existing processors or other hardware devices into the simulation as they look at other aspects of the distributed system, such as application performance, communications and real-time responsiveness.

Building in Applications

Verifying that the infrastructure operates as expected is an important part of the simulation exercise, but simulating what is supposed to happen on the processor, field-programmable gate array (FPGA) or application-specific integrated circuit (ASIC) is another matter entirely. In most cases, engineers simply simulate expected inputs and outputs, with the expected real-time lapse for data acquisition and processing. It’s relatively easy to implement on devices, if the primary goal is to test communications operation and latencies.

Fig1 Simulink MathWorks Simulink shows signal values when stepping back and forward through a communications simulation.

There are cases, however, where the bulk of the on-chip application actually exists, such as in control systems that have in the past operated independently. In these cases, HIL using existing hardware and applications makes sense. In that way, engineers can run most, if not all of the actual applications—and focus specifically on the communications parameters among them.

Managing Network Communications

The last step in building and managing such a system is integration, data exchange, and control across many nodes. This requires a strategy that lends itself well to distributed management systems. While this can be difficult to simulate, there are solutions that can run in an HIL configuration with a focus on different types of communications and different media.

There is a specification and public standard for such control software, maintained by the Object Management Group. This standard, called Distributed Data Service (DDS), addresses publish-subscribe communications for real-time and embedded systems. This approach enables new components to be added to the network at any time and subscribe to global data, an essential element of any large-scale network. DDS introduces a virtual Global Data Space where applications can share information by simply reading and writing data-objects, addressed by means of an application-defined name.

Any simulation incorporating many different nodes and requiring complex data interactions must also include mitigation and control software. While DDS was intended to be a specification for operating software, it can also be implemented and run on top of a large-scale system simulation, as well as with the resulting product.

Some simpler M2M networks don’t require this level of peer-to-peer control, but it is becoming more common with systems requiring real-time data and feedback for control systems. DDS specification developer Real-Time Innovations, for example, reports significant use in hospital and medical environments, command and control systems, and aviation communications.

From Simulation to Product

M2M networks are an evolving set of systems, including processors, ASICs, network communications, operating system instructions and communicating applications in a complex, interacting network. The set of systems is usually self-managed in that it uses data generated by data acquisition devices to make and implement simple decisions on the systems being controlled.

Organizations seeking to develop their own internal M2M network, or plugging into the larger and more public Internet, will find simulation to be a faster and more reliable network of devices without having to build and rebuild it multiple times. Simulating communication systems with hardware, or simulating the hardware and applications also, can make the difference between a smoothly functioning network and one that needs continuous adjustment once in production. If the network is used in a manufactured product, such as an automobile, any error or inefficiency in design could result in recalls or field adjustments of the entire product line.

A comprehensive approach requires simulating the hardware, operating system, management software and even apps. Because communications represents such a large part of the unknown and difficult to predict, HIL simulations are often appropriate. Either way, the end result of simulating communications systems can be better designs that are less costly during the design process.

Contributing Editor Peter Varhol covers the HPC and IT beat for DE. His expertise is software development, math systems, and systems management. You can reach him at [email protected].

More Info

Share This Article

Subscribe to our FREE magazine, FREE email newsletters or both!

Join over 90,000 engineering professionals who get fresh engineering news as soon as it is published.

About the Author

Peter Varhol

Contributing Editor Peter Varhol covers the HPC and IT beat for Digital Engineering. His expertise is software development, math systems, and systems management. You can reach him at [email protected].

Follow DE