**5. Conclusion and related works**

Based on the information listed in the previous sections, it can be concluded that both protocols (MQTT and CoAP) are considered for use in restricted environments and on devices with battery, processor and limited memory. However, although the two protocols were designed for application in limited environments, the MQTT exchange protocol has the following advantages over CoAP:


communication "one to one" for information transfer between client and server, using the UDP/IP protocol;

• Because the MQTT protocol has an exchange of messages based on the publish/ subscribe model (**Table 3**), decoupling the sender and receiver from the message both in space and time. Thus the sensors that produce the data do not need to know the identity of the clients who are interested in that information. While in CoAP it is the opposite, the protocol requires the identification of both parties;

According to [14], Due to these characteristics, and mainly the characteristic of being a protocol of communication "many to many", the MQTT protocol, has a greater relevance and use in the existing researches that use scenarios where the number of devices communicating is great. The protocol is used in systems that seek to monitor industrial environments, comparative performance analysis with other industrial protocols of the Internet of Things and M2M and in situations of latency estimation in communication.

In [15], the MQTT and CoAP protocols were responsible for connecting sensors and controlling devices on channels with low bandwidth and little robustness. In this case, they were used in conjunction with the Narrowband-IoT standard (NB-IoT), which has the characteristic of allowing mobile phone communication to be used by devices with limited capacities.

According to [18], CoreSys-Cloud four services were implemented, namely:

and analyzing data for state assessment and monitoring;

between the OPC-UA/MQTT gateway and CoreSys-Cloud.

• Flask: Software used for web application development;

*Framework proposed CORESYS CLOUD. Source: [17].*

*Interaction Protocols for Multi-Robot Systems in Industry 4.0*

*DOI: http://dx.doi.org/10.5772/intechopen.97481*

**Figure 12.**

**167**

protocol, using its security features (**Figure 13**).

• Machine Learning e Data Analythics (MLDA): Module responsible for learning

• MySQL database server: responsible for storing the results MLDA evaluation;

• Server MQTT: the MQTT server is responsible for establishing communication

Cyber security is treated as one of the technological pillars of industry 4.0, which in turn is associated with the protection of software, machines, equipment, network infrastructures and systems. Thinking about it [19] proposed a new approach to protect communication between networked robotic systems, providing authentication and data encryption.The Robot Operating System (ROS) is one of the best robotic software development platforms, offering low-level device control, diverse resources and many useful tools for simulating, visualizing and debugging data, making it very popular with researchers from various robotics fields. Communication in ROS is based on a publish-subscribe system, using the Remote Procedure Call Protocol (RCP) and Extensible Markup Language (XML), with the data sent in clear text over TCP/IP or UDP/IP, without any security mechanism. Based on these aspects, the authors proposed an integration between ROS and the MQTT

The authors performed a performance analysis comparing a system without using the security systems offered by MQTT and another system using the MQTT cryptography resources. The results show that the encrypted solution adds negligible delays during communication between clients and servers.

Studies involving the implementation of ROS in industrial environments are gaining more and more evidence. The functioning of ROS is similar to the MQTT protocol in that it works about a publish/subscribe architecture, and use versions ROS of TCP and UDP protocols. Both versions called TCPROS and UDPROS. Due to the use of this architecture, ROS is composed of two elements. The master, which

In [13], the authors analyze the feasibility of using ciphertext policy attributebased encryption (CP-ABE), to allow the security of IoT devices, using the ´MQTT protocol and its variants SMQTT and SMQTTSN.

The authors in [16], the authors use the Prognostic Health Management (PHM) system to detect anomalies in industrial systems. It is proposed in this way the integration of the PHM system to the industrial environment of IoT, based on MQTT and Cloud Computing in order to allow the assessment of the state of the equipment in real time, thus improving the performance of the PHM.

In [17] a cloud-based architecture based on machine learning, for condition monitoring, fault detection and process optimization in industrial environments. The implemented system uses the Dempster-Shafer Evidence Theory (DSET) (**Figure 12**).

In **Figure 12**, the main components proposed can be seen. In this work, the OPC-UA/MQTT gateway is used to communicate between OPC servers on the automation platform and the CORESYS CLOUD broker.


#### **Table 3.**

*Comparison table between MQTT and CoAP protocols.*

*Interaction Protocols for Multi-Robot Systems in Industry 4.0 DOI: http://dx.doi.org/10.5772/intechopen.97481*

communication "one to one" for information transfer between client and

• Because the MQTT protocol has an exchange of messages based on the publish/ subscribe model (**Table 3**), decoupling the sender and receiver from the message both in space and time. Thus the sensors that produce the data do not need to know the identity of the clients who are interested in that information. While in CoAP it is the opposite, the protocol requires the identification of both parties;

According to [14], Due to these characteristics, and mainly the characteristic of being a protocol of communication "many to many", the MQTT protocol, has a greater relevance and use in the existing researches that use scenarios where the number of devices communicating is great. The protocol is used in systems that seek to monitor industrial environments, comparative performance analysis with other industrial protocols of the Internet of Things and M2M and in situations of latency

In [15], the MQTT and CoAP protocols were responsible for connecting sensors and controlling devices on channels with low bandwidth and little robustness. In this case, they were used in conjunction with the Narrowband-IoT standard (NB-IoT), which has the characteristic of allowing mobile phone communication to be

In [13], the authors analyze the feasibility of using ciphertext policy attributebased encryption (CP-ABE), to allow the security of IoT devices, using the ´MQTT

The authors in [16], the authors use the Prognostic Health Management (PHM)

In [17] a cloud-based architecture based on machine learning, for condition moni-

**MQTT MQTT-SN CoAP**

Yes Yes Yes

Client/Server

Broker-based, Client/Server,

Topic-based REST architecture

Client/Server (request/response)

system to detect anomalies in industrial systems. It is proposed in this way the integration of the PHM system to the industrial environment of IoT, based on MQTT and Cloud Computing in order to allow the assessment of the state of the

toring, fault detection and process optimization in industrial environments. The implemented system uses the Dempster-Shafer Evidence Theory (DSET) (**Figure 12**). In **Figure 12**, the main components proposed can be seen. In this work, the OPC-UA/MQTT gateway is used to communicate between OPC servers on the

equipment in real time, thus improving the performance of the PHM.

Network Protocol TCP/IP Not specified UDP Useful data type Binary Binary Binary

Security SSL/TLS Not specified DTLS Scalability Simply Simply Complex

QoS Options Yes Yes Yes

server, using the UDP/IP protocol;

*Robotics Software Design and Engineering*

estimation in communication.

Suitable for microcontrollers

Network architecture

Network architecture

**Table 3.**

**166**

used by devices with limited capacities.

protocol and its variants SMQTT and SMQTTSN.

automation platform and the CORESYS CLOUD broker.

Broker-based (publishes/

Broker-based (publishes/

subscribes)

subscribes)

*Comparison table between MQTT and CoAP protocols.*

**Figure 12.** *Framework proposed CORESYS CLOUD. Source: [17].*

According to [18], CoreSys-Cloud four services were implemented, namely:


Cyber security is treated as one of the technological pillars of industry 4.0, which in turn is associated with the protection of software, machines, equipment, network infrastructures and systems. Thinking about it [19] proposed a new approach to protect communication between networked robotic systems, providing authentication and data encryption.The Robot Operating System (ROS) is one of the best robotic software development platforms, offering low-level device control, diverse resources and many useful tools for simulating, visualizing and debugging data, making it very popular with researchers from various robotics fields. Communication in ROS is based on a publish-subscribe system, using the Remote Procedure Call Protocol (RCP) and Extensible Markup Language (XML), with the data sent in clear text over TCP/IP or UDP/IP, without any security mechanism. Based on these aspects, the authors proposed an integration between ROS and the MQTT protocol, using its security features (**Figure 13**).

The authors performed a performance analysis comparing a system without using the security systems offered by MQTT and another system using the MQTT cryptography resources. The results show that the encrypted solution adds negligible delays during communication between clients and servers.

Studies involving the implementation of ROS in industrial environments are gaining more and more evidence. The functioning of ROS is similar to the MQTT protocol in that it works about a publish/subscribe architecture, and use versions ROS of TCP and UDP protocols. Both versions called TCPROS and UDPROS. Due to the use of this architecture, ROS is composed of two elements. The master, which

The MQTT emerges as an excellent alternative for communication between multi robot systems in several other works, as in [16] the the authors conducted a study on the use of MQTT COAP and protocols in Ubiquitous Network Robot Platform (UNR- PF) for the communication of a multi-robot system. In this work, the authors were able to verify that the MQTT protocol is easier to be implemented in the multi robot platform (UNR-PF) than CoAP, in addition to having a higher data transfer rate. Other works related to the use of the MQTT protocol in

multi-robot systems are: [14, 24, 25].

M2M Machine-to-Machine IoT Internet of Things IP Internet Protocol

PDU Protocol Data Unit MQTT-SN MQTT Sensor Network

TLS Transport Layer Security

ROS Robot Operating System

PHM Prognostic Health Management MLDA Machine Learning e Data Analythics

RCP Remote Procedure Call Protocol XML Extensible Markup Language UNR-PF Ubiquitous Network Robot Platform AMQP Advanced Message Queuing Protocol

PLC Programmable Logic Controller HTTP Hypertext Transfer Protocol FTP File Transfer Protocol

*Interaction Protocols for Multi-Robot Systems in Industry 4.0*

*DOI: http://dx.doi.org/10.5772/intechopen.97481*

MQTT Messaging Queue Telemetry Transport CoAP Constrained Application Protocol

AMQP Advanced Message Queuing Protocol DTLS Datagram Transport Layer Security

CP-ABE Ciphertext Policy Attribute-based Encryption

**Abbreviations**

**169**

acts as the MQTT broker, and the nodes, which act as the clients. As o MQTT, ROS controls the data ow through the topics that are coordinated by the master [20]. The main difference between ROS and MQTT, in terms of communication, is the fact that broker has topics with defined typing, that is, a topic will be created with a single type and will receive subscribers and publishers of this type only.

The Authors in [20], presented an implementation of MQTT integrated to ROS, showing the feasibility of using this protocol in the 4.0 industry scenario. [21] cited in [20], evidence the use of ROS in comparison with a traditional solution (**Figure 14**).

In [22] the authors made a comparison between the AMQP (Advanced Message Queuing Protocol) and MQTT protocols, in the context of a smart factory environment, with ROS also being used in some applications that required a more complex and heterogeneous environment.

In [23], The authors proposed os the implementation of internet technology for monitor and control industrial amr robot in industry. Was made a web-based interface for monitor motion and controlling the angle of joint arm robot in a ROS industrial simulation environment, using the mqtt protocol to communicate between the robot and the client, give low latency data transmission.

**Figure 14.** *AMQP architecture.*

*Interaction Protocols for Multi-Robot Systems in Industry 4.0 DOI: http://dx.doi.org/10.5772/intechopen.97481*

The MQTT emerges as an excellent alternative for communication between multi robot systems in several other works, as in [16] the the authors conducted a study on the use of MQTT COAP and protocols in Ubiquitous Network Robot Platform (UNR- PF) for the communication of a multi-robot system. In this work, the authors were able to verify that the MQTT protocol is easier to be implemented in the multi robot platform (UNR-PF) than CoAP, in addition to having a higher data transfer rate. Other works related to the use of the MQTT protocol in multi-robot systems are: [14, 24, 25].
