# Enhancing Security in Smart Robot Digital Twins Through Intrusion Detection Systems
## 4 Test Architecture and System Implementation  
In this chapter, we will describe the test system architecture used to evaluate the IDS system in DT. We will also discuss the datasets chosen for this analysis. The system is used to monitor a network composed by a set of industrial devices which are creating a cyber-physical system presented in Figure 1. The physical part is represented by a flexible manufacturing cell composed of a set of six Omron industrial robots connected together with a closed loop conveyor belt. Each robot is monitored by an IIoT system based on the Arduino platform, which collects a set of data (like energy consumption, vibration, temperature, etc.) which cannot be collected directly by the robot controller, and a C# application which is running on a workstation connected to the robot controller through the Omron Automation Control Environment API and is collecting data from the robot controller. The Arduino IIoT systems are connected using WiFi connections to a router inside the robot network, and from there to the DT, which is running in a container in the cloud (for each robot there is a DT available in the cloud); the Arduino IIoT systems are used only for telemetry (they are just monitoring the robot parameters and sending the data to the DT). The C# applications are collecting data and sending them to the DT, but also can receive commands from the DT. In the network, there is also a server used for production planning and management, which is also used for testing different data aggregation methods. The network also has other devices which are connected, like a PLC (Programmable Logic Controller) which controls the production and a set of workstations, which are not present in Figure 1. The setup is implemented in a laboratory environment located at the National University of Science and Technology Politehnica of Bucharest, Faculty of Automatic Control and Computers, in the laboratory of Industrial Robots and Manufacturing Control. The DT is used to test a high availability (HA) solution for a flexible manufacturing cell implemented with a closed loop conveyor belt and six industrial robots. The robots are configured into an HA cluster which allows (in the case of a robot malfunction) the migration of the tasks between robots, offering continuous production. For this, each robot is monitored and its status and memory (variables, programs, and execution pointers) are saved in the cloud using real-time communication. These particular robots do not possess backup batteries for the memory, so in a case of power failure the production must be started from the beginning. The DT compensates for this deficiency by allowing a recovery procedure which will allow the transfer of the controller memory back from the cloud and continue the production from the last saved point under operator supervision. The DT is also used to administer the HA cluster (transferring the tasks between robots, and removing or adding a robot in the cluster). This is the setup of the industrial system, which is not imposing constraints on the security solutions; this setup was chosen in order to have a diverse set of data and communication protocols. Taking into consideration the architecture of the system, we can see that in the network, there are IIoT systems based on microcontrollers and WiFi connections, workstations, robot controllers, and a server connected using Ethernet and having different operating systems (Windows, V+, and Linux) and using industrial and non-industrial communication protocols. Even if there is a VPN (Virtual Private Network) which connects the system with the cloud, the security problems should be seriously taken into consideration. One component of the security solution is to use an IDS which will be useful to identify security events and even to prevent ongoing and future attacks. In this regard, we have created an IDS system architecture that incorporates a DT.