• No results found

GENERIC CONFIGURATION SYSTEM 109

System Overview

7.3. GENERIC CONFIGURATION SYSTEM 109

7.3 Generic Configuration System

The implementation of a generic configuration system allows the user to connect to a data source and upload a model. A new asset is not made available for assessment due to COVID-19 restrictions. Hence, the configuration of a new digital twin and assessing the fulfillment of this objective is not possible following the method described in 3.3. Thus, there is uncertainty about how the platform performs with new assets. However, the system complies with the requirements related to the objective of implementing a generic configuration system.

7.3.1 Datasources

Functional requirements FR01a and FR01b areThe user should be able to connect to streams of sensor data by providing IP address andThe platform should accept data streams in JSON and CSV formats. Compliance with the requirements involved creating a configuration process for data sources in the client, and modifying datasource configuration in the back-end: removing port number and facilitating JSON object compatibility.

There are two reasons why the port number is no longer in use. The first reason is that the operating system can automatically select a port, which is often preferable as the operating system knows which ports are available. An effect of only using the IP address is that there can be only one connection for each device.

It is not a loss of functionality as one should be able to collect and send all sensor data from an asset as it is easier to handle fewer connections. After implementing the video streaming feature through YouTube, it is a reasonable requirement that all sensor data arrives in one signal. Furthermore, port numbers might be challenging to configure from some applications. The SensorLog application used during development does not allow the user to see or edit port numbers. One would have to send data to an intermediate link that could forward the data using a specified port number, which more complicated.

When it comes to expanding support of the data format of the streams, there are several aspects to consider as there are advantages and disadvantages to the different formats. An effect of accepting multiple formats is more complex code for data handling in the back-end. The main advantage of transmitting the data as an array of data points (CSV) is that it is compact, and uses the actual sensor data. Handling this code on the server-side is simpler than JSON, as the data usually arrives in one message. This is because the size of the CSV data in bytes is assumed to be below the limit of the maximum transmission unit (MTU) on the network. However, the user needs to know precisely how the data

is sent and specify the structure. It is cumbersome to fill out this information manually, and it might be challenging to find the configuration of the data.

Data sent as JSON objects is on a key-value format. The data points arrive with descriptive labels, simplifying the configuration of the data source for the user as the server automatically extracts the sensors and displays them to the user. Hence, the user selects the sensors they are interested in and does not need to know the details of the messages. However, there is an overhead of sending the data on a key-value format. If the packet size is larger than the MTU, it needs to be fragmented into multiple pieces. As the size of the message increases, the probability of packet fragmentation increases, meaning that the server must handle both packets arriving in non-chronological order and match packet fragments to retrieve the entire message. The data is sent in a CSV format when it is forwarded to the client, which restricts the issues mentioned above to the transmission from the physical asset to the server.

7.3.2 Models

There is one requirement concerned with the configuration of models, namely FR02: The user should be able to generate a 3D model by uploading an FMU file. Functionality for uploading virtual assets is implemented to accept models on FMU or FMM format. FMU is, as stated in Section 2.4.6, an instance of an open-source standard for dynamic simulation of models.

The user can upload a model, and the back-end starts the generation process.

The server reads the file and generates JSON files for visualization, a resource-intensive task. Initially, the back-end did not respond to the upload request until the entire process was complete. The process can take minutes to perform, and the back-end temporarily blocked the connection between the server and other clients. The process is modified so that a response is sent to the user when the file isreceived in the back-end, which enables the processing of the file to run in a background process on the server. When the process has finished, a notification is sent to the client through the front-end, informing the user that their model has finished processing and can be visualized in the models tab.

7.4 Monitoring

The monitoring objective requires the implementation of tools that allow the user to see the current state of their assets. The user should get updates in

7.4. MONITORING 111 real-time. The objective is evaluated according to the plan, and the results show that it is fulfilled.

7.4.1 Monitoring Tools

Requirements FR03 and FR04 concern monitoring tools that can visualize the state of the asset in different ways: The system should visualize real-time data streams from physical assets and The system should visualize and update 3D models in real-time. Curve plots, maps, and video streaming are implemented to comply with these requirements. A Butterworth filter provides processing of sensor values in real-time to remove noise from the signal per requirement FR10:

The user should be able to apply filters to datasources. Real-time predictions of sensor values and event triggers notify the end-user of alarming sensor values and deviation from expected behavior. Requirement FR09 isThe system should provide predictive maintenance functionality to avoid equipment failure.

Curve Plot

Curve plot exposes information about the state of the asset efficiently. Scatter and line graphs are available. Plotly offers a selection of graph types and configurations, and be used to add other plot types. Real-time data requires efficient handling, and the curve plot component is only re-rendered when new data arrives. Plotly has a function calledscattergl, which is implemented to give better performance when a large number of data points are involved.

Filter

Configuration of processors uses four HTTP requests from the client to the server to create, configure and start a processor, which takes several seconds. The process should only use one request that contains all necessary configuration data as one usually wants to start a processor right away.

Maps

The current map implementation works well for the intended use. Possible additions include plotting historical positioning data in a map or tracing the position in a dynamic map. The two examples require similar code modifications and are possible to add to the current solution. React leaflet and leaflet.js are leveraged in the implementation, and provide a large number of components and functionality.

Video Streaming

Real-time video streaming supports inspections of physical twins from remote locations. In Kjernlie and Wold (2019), implementing video streaming is classified as ”won’t have” functionality as it would have required a lot of resources, both in terms of implementation time and storage capacity. An alternative solution is discovered and implemented through YouTube’s streaming functionality. The user can set up a video stream through YouTube, which can be implemented in the front-end solution without implementing or storing any data. YouTube stores the live-stream for up to 12 hours, which makes it possible to rewind to view previous events. There are three delay options; normal latency, low latency, andultra-low latency. Normal latency could be as high as 10 seconds, whereas the ultra-low latency reduces to a couple of seconds. Ten seconds is not acceptable as it is not within the threshold of ”real-time”; hence ultra-low latency is preferable.

Models

Scripts from Ceetron facilitate model visualization in the front-end. Ceetron is a commercial company that works with 3D visualization, and the files are not in the Github repository due to NDA restrictions. An open-source solution is desirable, so future work should research an alternative to the Ceetron scripts.

It is possible to add a sensor to the model and select a data source. In the future, one should simulate stresses and strains in the entire object, and give an estimate of the chosen position’s value by interpolation. This value can be visualized in the sensor’s position. Stresses and strains, can be visualized with a color scheme, as shown in Figure 6.16c. The color scheme implemented in this project only uses dummy data for demonstration purposes.

An FMU processor is implemented in Jensen (2019) to update the state of the models. It was implemented in the client during development, but had a latency of several minutes. After discussions with the stakeholders, it was decided that the server of the platform should be improved before these processors are implemented due to the latency. Hence, visualizing displacements or stresses and strains in real-time is removed from the scope of the thesis, as it is not realistic to achieve real-time updates with the server’s properties. However, this visualization is an essential part of digital twin application, and should be given a high priority in future work with the platform.

7.4. MONITORING 113