## 4 Technologies to Support Contextualization
### Sampling and Integrating Process Data
#### 4.2.1 Sampling Dynamic Data  
Dynamic data are sampled via different kinds of sensors. Often, not all the relevant data are available, as older plants and machines lack modern sensor technology. In this case, _retrofitting_ is possible, e.g., [130] sensors are added that do not intervene in the process but passively collect data and make it available. For instance, a sensor that measures rotation angle can be attached to a chocolate packaging machine and, when combining its data with machine models, it is possible to conclude where each machine part is located at any given time. In this way, potential problems can be eliminated during fault diagnosis (e.g., if a fault occurred while the injector made no contact with the chocolate bar, the injector cannot have caused the broken chocolate). In the process industries, Namur Open Architecture (NOA) provides access to existing field devices and makes it possible to use their information for further applications without interfering with their primary function [131]. However, the present article is less concerned with the question of which data are measured but focuses on the way these data are handled and made available to provide context. This is achieved by _middleware technologies_[133; 132]: software that serves as an intermediary between devices and applications. A key technology for handling dynamic data is _OPC UA_[134], a standard that defines how data can be described and exchanged. In addition, the supplementary Companion Specifications create uniform information models that can be used by different manufacturers. In this way, a common understanding of data is guaranteed. The main advantage of OPC UA is that it relies on a semantic information model: devices not only transmit their values but provide information about what they are and how they work (e.g., type of sensor, range of possible values). For instance, this makes it possible to connect a measurement of the current machine temperature with knowledge about where the temperature sensor is located, how it functions, and how temperature affects the process. In this way, knowledge about the plant can be used to interpret the origin and consequences of process data. A disadvantage of OPC UA is its lack of real-time ability. In consequence, it cannot easily handle the fast processes that are common in the discrete processing industry (e.g., packaging 2300 pieces of candy per minute). However, this problem can be solved by combining an OPC UA hardware implementation [135] with time-sensitive networking (TSN) [136]. TSN is a standardized mechanism that is implemented in devices and helps guarantee determinism in network timing, which allows for real-time communication. When combining TSN with OPC UA [137], the advantage of semantics is retained. Although operators usually do not need to see data at such high rates, real-time communication can be a prerequisite for other technologies for operator support (e.g., machine learning that requires data about each chocolate bar). Computations based on sensor data can be performed at different locations. The decision of where to perform computations depends on where the data are needed and how time-critical they are. On the one extreme, data are processed on servers which are far removed from the process. Such _cloud computing_ can be used to integrate data of different sub-plants, enabling conclusions about the state and performance of the entire plant network [138; 139]. Moreover, cloud-based services can perform advanced computations on sensor data [140]. In this way, data can be stored and evaluated at the company level across locations. These data can be pure sensor signals or data that were already pre-processed and interpreted. Cloud-based approaches can also be used to distribute knowledge of plants and fault diagnosis to make it accessible to specific groups. The other extreme is decentralized architectures or _edge computing_[141]. That is, sensors and actuators are equipped with local computing power and can perform simple computations themselves.