1. Introduction
The very recent fourth industrial revolution, known with the name of Industry 4.0, aims to create more flexible and innovative products and services leading to new added-value business models [
1,
2].
In the context of Industry 4.0, lot of effort is being put to achieve full integration of the industrial applications. According to the Industry 4.0 vision, a variety of areas related to manufacturing, security, and machine communication, among others, need to interoperate and align their respective information models. As the definition and adoption of communication standards are of paramount importance for the realization of interoperability, during the last few years, different organizations have developed reference architectures to align standards in the context of the fourth industrial revolution. One of the main examples is the “Reference Architecture Model for Industry 4.0 (RAMI 4.0)” [
3].
In order to fulfil the main requirements of Industry 4.0, especially in terms of interoperability, the concept of the asset administration shell (AAS) has been defined in RAMI 4.0. The AAS is intended to provide digital representations of all information being available about and from an asset, which can be a hardware system or a software component. For this reason, in November 2018, Plattform Industrie 4.0 (
www.plattform-i40.de) released the first draft of the document “Details of the Asset Administration Shell” [
4] defining the so-called AAS metamodel; it is mainly aimed to define internal structure of AAS in terms of digital information available for an asset. In November 2019, the version 2.0 of the same document has been released [
5]. AAS is not just a set of structured information about assets but offers service interfaces to access properties and functions provided by the physical assets [
6]. In RAMI 4.0, the conjunction of the physical asset and its AAS is referred as I4.0 Component. These components can exchange information in a uniform manner since all the different aspects of the implementation and communication of the assets are abstracted by means of the AASs.
In the context of interoperability inside Industry 4.0, there is also so much interest behind the standard OPC UA (open platform communications unified architecture) [
7]. OPC UA plays an important role in current industry environments [
8] and it is considered the most accepted protocol which harmonizes the machine to machine (M2M) interaction [
9]. During these last years, OPC UA has proven to be an effective communications middleware mainly in industrial applications [
10]. Due to its powerful functionalities, OPC UA is one of the main candidates to lead the standardization and systems integration for present and future frameworks [
10]. In particular, OPC UA is listed as the one recommendation for realizing the communication layer of RAMI 4.0 [
11]. Furthermore, it has been identified as one candidate to build I4.0 Component interface and an important means to provide information models of assets.
The standard OPC UA is based on both client/server and publish/subscribe communication models and provides a semantically enriched information model in order to represent data. Literature provides several publications taking advantage in terms of interoperability of OPC UA information model to structure and expose information coming from different domains of interest. Several papers describe how OPC UA information models for specific domains can be generated starting from the information models belonging to these domains. Some of the most relevant works include the mapping between IEC 61850 and CIM to OPC UA information models (e.g., [
12,
13,
14,
15,
16]). There also exist approaches for mapping and transformation of Unified Modeling Language (UML) to OPC UA (e.g., [
17,
18]). In [
19], analogies between IEC 62714 (AutomationML) and OPC UA are examined in order to simplify the creation of OPC UA information model based on already existing AutomationML (AML) data. Reiswich and Fay in [
20] discuss how it is possible taking advantage of OPC UA information model properties to improve the work situation of operators and engineers. In [
21], the software model of IEC 61131-3 for programmable logic controller (PLC) is translated into an OPC UA information model discussing also the advantage of adopting OPC UA for a secure data exchange. Several companion specifications dealing with the mapping of specific domain into OPC UA information models, are also available. OPC UA/PLC open companion specification [
22] deals with modelling PLCs. Another example is the OPC UA/AML companion specification [
23], which describes the transformation between AML and OPC UA information models. Another one, which is important for the manufacturing domain, is the OPC UA/MTConnect companion specification [
24]. Finally, it is important to recall the existence of OPC UA/IEC61850 companion specification for electrical substation automation systems [
25].
On account of what just pointed out and due to the important role played by AAS and OPC UA inside Industry 4.0, an OPC UA information model may be defined to structure and expose the current AAS metamodel [
5]. This may led to several advantages, among which the possibility to exchange AAS digital information between industrial applications through the OPC UA communication system. To the best of authors’ knowledge, some activities about this issue already exist. Document [
5] provides a proposal of mapping the AAS metamodel into several technologies, including OPC UA. Mapping of AAS metamodel into OPC UA information model is also under consideration by the ZVEI, VDMA and OPC Foundation joint working group [
26], aimed to the definition of a draft of a new OPC UA Companion Specification for AAS; no outcomes were still produced by this group.
The contribution of this paper is to give some insights behind modelling techniques that should be adopted during the definition of OPC UA information models exposing information relevant to the Industry 4.0 specific domains of interest. The current AAS metamodel [
5] is considered in this work. All the general rationales here provided are compared with the only other mapping proposal between AAS metamodel and OPC UA available in literature (contained in [
5] as said before), when needed. Specifically, differences will be pointed out giving to the reader pros and cons behind each solution.
It is important to point out that the work presented in this paper must not be considered an alternative to the document [
5] or to the ongoing work carried on by the ZVEI, VDMA and OPC Foundation joint working group or any activities done by other research groups. Since AAS metamodel, and thus its mapping in OPC UA, is continuously developed and improved, authors’ aim is only to provide reasoning about mapping choices that may be considered for future versions of such mapping solutions.
This paper is an extended version of the earlier publication by the same authors [
27], which reported very preliminary results of their studies and has been published before the document [
5]. This last information is given to the reader only to point out that many reasoning exposed in this paper have been conceived before the OPC UA information model presented in [
5].
The paper is structured as it follows. In
Section 2 a background of the AAS metamodel is provided, describing the fundamental entities specified in [
5]. In
Section 3 the OPC UA Information Model is presented.
Section 4 gives an overview about general techniques to be adopted to map specific domains of interest into OPC UA Information Model. In
Section 5, the general mapping techniques shown in the previous section will be exemplified for the AAS metamodel, providing rationales behind mapping decisions and comparisons with actual solutions given in [
5].
Section 6 points out how adoption of new OPC UA mechanisms defined in recent amendments may led to enhancements in the mapping process based on OPC UA information model. In
Section 7, a case study will be presented in order to help the reader to better understand the reasoning discussed in the paper. Finally,
Section 8 will point out the software implementations made by the authors, some of which are open source and available on GitHub.
2. The Asset Administration Shell Metamodel
The internal structure of AAS was described in a very high level of abstraction in [
3] and in [
28]; its definition takes in account lot of requirements summarized in [
28]. As shown by
Figure 1, AAS consists of a header and a body; the former contains information about identification of the AAS and the asset it represents, whilst the latter contains a certain number of submodels. Submodels represent different aspects of the concerned asset (e.g., engineering, communication, and drilling). Standardized submodels defining functions and properties are foreseen to represent each aspect [
29].
Every sub model contains a hierarchy of Properties related to the domain of the sub model itself. The format of the property descriptions should follow a standard, like IEC 61360 [
30]. Sub models are composed of Sub model elements, each of which is an abstract class for all the entities in the metamodel that can be aggregated by a sub model.
In [
4,
5] the AAS metamodel is introduced. These documents describe how information is structured inside an AAS. In the remainder, details about the latest AAS metamodel will be provided giving a description of its fundamental entities [
5].
Entities in the AAS metamodel can inherit from more than one common class (multiple inheritance). Common classes are abstract classes used to describe aspects shared by metamodel entities; they are Identifiable, Referable, HasKind, HasSemantics, and HasDataSpecification. Due to lack of space, only the most important attributes of common classes and AAS entities will be described in the following. For a complete description, the reader should refer to [
5]. From now on the name of a common class will be used for a particular metamodel entity if it inherits from that common class. For example, “HasSemantics entity” will refer to an entity inheriting from the HasSemantics common class; saying that an asset is either “Identifiable” or an “Identifiable entity” means that the asset entity inherits from the identifiable common class.
2.1. Identifiable and Referable
In the digitalization process of an asset, everything should be unambiguously identified: parts, products, people, software and services. But in order to achieve interoperability, relationships between entities shall be identifiable too. For this reason, the AAS metamodel makes a distinction between elements that are identifiable, referable or none of both.
An identifiable entity can be uniquely identified by means of a globally unique identifier. This is a very important feature for an entity, because this makes possible to refer the entity in any context.
Table 1 summarizes the attributes of identifiable entities. Identifier is a structured type and is composed of a string field (id), and a second field (idType) of type IdentifierType; according to [
5] IdentifierType is an enumerative type made up the following elements: IRDI, URI and Custom. Values of identifier type are used inside the attribute identification of identifiable entities, as shown in
Table 1.
Table 2 summarizes the attributes of referable entities. A referable entity provides a short identifier (
idShort) that is unique only in the context of its name space. The name space for a referable entity is defined as its parent element that is either referable or identifiable. Identifiable entities are also referable but the vice versa is not true.
2.2. Reference
The reference entity is needed in order to establish relationships between entities composing the AAS. References can also be used to refer entities not defined internally the AAS but in some external source. An entity should be at least referable to be pointed by a reference.
The AAS reference entity features the attribute key, which is logically structured as an ordered list of keys where each element refers an entity by means of its identifier. The structure of this key list resembles an URI structure, where the first key refers to the root element and every following key identifies the next element in the hierarchy leading to the referred element, identified by the last key of the list.
Each key in the list belongs to a structured type named Key, featuring several attributes. The mandatory attributes are local, type, value and idType. The attribute local specifies whether the referred element is local to the AAS or not. The attribute type specifies the class name of the referenced entity; its value belongs to a custom type named KeyElements, which is an enumeration consisting of all the names of the entities in the metamodel (e.g., property, asset, submodel). The attribute value is a string containing the identifier of the entity referred by the key. The attribute idType describes the kind of identifier used in attribute value; its value is of type KeyType which is an enumeration of all the different kinds allowed for both global and local identifiers, i.e., IRDI, IRI, Custom, idShort and FragmentId (see [
5] for the relevant definitions).
2.3. HasKind
The common class HasKind identifies all those entities that can have the double nature of template and instance; the concept of template represents the concept of class in object-oriented programming (OOP), so that an entity instance derives from an entity template in the same way as an object instance derives from a class in OOP.
Templates define common features for all its instances. An entity that can be either a template or an instance is referred in the metamodel as a HasKind entity. It is featured by a unique optional attribute, named kind, which can take either the value “Template” or “Instance”.
2.4. HasSemantics
HasSemantics entity is whatever AAS entity that can be described by means of a concept. A HasSemantics entity owns a reference to another external entity that describes its meaning in a proper manner. To this aim, the HasSemantics element has only one optional attribute, the semanticId, which is a reference to the semantic definition of the element.
2.5. HasDataSpecification and DataSpecification
One of the requirements for the AAS mandates that the definition of additional attributes (e.g., manufacturer specific) for some entities must be possible. An entity that allows its instances to contain additional attributes to those already defined in the entity itself is identified as HasDataSpecification entity. Such an entity contains one or more References to so-called data specification templates (DST), which are used to define the additional attributes. The only attribute inherited by the HasDataSpecification common class is the optional hasDataSpecification, which contains References to the DSTs eventually used.
Even if [
5] specifies that DST does not belong explicitly to the metamodel, its internal structure is described using an entity named DataSpecification; it is identifiable, so that its identifier can be used inside references. It consists of an entity named DataSpecificationContent containing the definition of the additional attributes. In other words, if a particular instance of a metamodel class features some additional attributes not defined in the class itself, such instance shall refer a DataSpecification defining such additional attributes in order to declare the presence of these last.
2.6. AssetAdministrationShell
The main element of the entire AAS metamodel is represented by the AssetAdministrationShell entity. This entity is both Identifiable and HasDataSpecification. It provides more attributes based on how an AAS is structured [
28];
Table 3 summarizes some of them.
The derivedFrom attribute is used to establish a relationship between two AASs that are derived from each other; it contains a Reference. In case of an AAS representing an asset instance, this reference points to the AAS representing the corresponding asset type or another asset instance it was derived from. The same holds for AAS of an asset type as types can also be derived from other types.
The other attributes shown in
Table 3 (i.e., asset, submodel and conceptDictionary) refer to the Asset, Submodel and ConceptDictionary entities described in the following subsections, respectively.
2.7. Asset
The Asset entity contains all metadata of an asset represented by an AAS. This entity is Identifiable and HasDataSpecification. Usually it owns a reference to a Submodel entity describing identification aspect of the asset itself, but this is not mandatory.
It features an attribute kind that specifies whether the asset is a type or an instance, in accordance to the asset life cycle as said in [
31]. This attribute is used to maintain the relationship between an asset type and its asset instances for their whole lifecycle; in this way, updates on the AAS of the asset type can be reflected on the AASs of the respective asset instances.
2.8. Submodel and SubmodelElement
The Submodel entity defines a specific aspect of the asset represented by the AAS. It is used to structure the AAS into distinguishable parts, organizing related data and functionalities of a domain or subject. Submodels can become standardized, but at the time of writing this paper, no standard Submodels have been released.
This entity is Identifiable, HasKind, HasDataSpecification, and HasSemantics. In case of a Submodel with kind = “Instance”, the semanticId attribute may refer to another Submodel entity with kind = “Template”.
Submodel aggregates SubmodelElements that are related to the same aspect of the asset identified by the Submodel itself. For this reason, the Submodel entity defines another additional attribute, named submodelElement, which is a composition of zero or more SubmodelElements. A SubmodelElement entity is suitable for the description and differentiation of assets. The SubmodelElement entity is Referable, HasKind, HasDataSpecification and HasSemantics. All the SubmodelElements of a Submodel with kind = “Template” are in turn SubmodelElement templates (i.e., kind = “Template”).
2.9. DataElement and Property
DataElement is a SubmodelElement that is no further composed out of other SubmodelElements.
A Property is a DataElement that is made up by the additional attributes shown in
Table 4. The attributes value and valueType are the most important; the latter specifies which kind of data value is contained in the former. This information is necessary to decode such a value.
2.10. ConceptDictionary and ConceptDescription
One of the core entities of the AAS metamodel to achieve interoperability is ConceptDescription; it is used to define the semantics of entities inside the AAS metamodel. The ConceptDescription entity is Identifiable and HasDataSpecification. Every element in AAS that is HasSemantics should have its semantics described by a ConceptDescription, unless a more specific solution is adopted.
The entity ConceptDictionary represents a collection of ConceptDescription instances. ConceptDictionary is referable and it defines an additional attribute named conceptDescription. Such attribute is a composition of AAS References pointing to ConceptDescription instances.
Typically, a concept description dictionary of an AAS contains only concept descriptions of elements used within submodels of the AAS. In certain scenarios, the concept dictionary may contain copies of property definitions coming from external standards. In this case, a semantic definition to the external standard shall be added; for this reason, ConceptDescription defines the additional optional attribute isCaseOf, which represents a global reference to an external definition the concept is compatible with or was derived from. For instance, if the semantics of a Property in the AAS is defined in eCl@ss [
32], a ConceptDescription instance must be created and its attribute isCaseOf must be filled with a reference pointing to the relevant eCl@ss ID [
5]. ConceptDescription should follow a standardized template to describe a concept. The only templates available in the metamodel are used to define both semantics of Properties according IEC 61360 [
30] and physical unit of measurement.
3. OPC UA Information Model
The OPC UA Information Model provides a standard way for servers to expose information to clients. The set of information is maintained through OPC UA Nodes grouped together to compose the so-called OPC UA AddressSpace [
7,
33]. The OPC UA Information Model is based on OOP, so that some nodes representing instances inherit from other nodes defining types; multiple inheritance is not recommended in OPC UA even though the specification does not restrict type hierarchies to single inheritance [
34].
Each OPC UA Node belongs to a class named NodeClass, some of which will be described in the following. Among the available NodeClasses, there is the variable NodeClass which is used to model data. This NodeClass features an attribute named Value, containing the data, and an attribute named DataType, specifying the type of the content of the attribute Value. DataType may be Built-in, Enumeration or Structured. Arrays of elements belonging to Built-in, Enumeration and Structured DataTypes are also allowed. Two types of Variables are defined: Properties and DataVariables; differences between them and the relevant data they can model, will be discussed in
Section 4.
Another NodeClass is the Object. It is a container for other OPC UA Objects and Variables. For example, since the Object Node does not feature an attribute that can be used to contain a data value (e.g., the temperature value of a sensor), an OPC UA DataVariable Node is used as a component of an OPC UA Object Node to represent data associated to that Object.
OPC UA includes NodeClasses defining types. ObjectType NodeClass is used to define types for OPC UA Objects; Objects are instances of ObjectTypes in the sense that they inherit the Nodes beneath their ObjectTypes. OPC UA defines the BaseObjectType which all the ObjectTypes must be extended from. OPC UA already defines several standard ObjectTypes derived from BaseObjectType. An example of ObjectType is FolderType whose instance, named Folder, is an Object organizing the AddressSpace into a hierarchy of OPC UA Nodes; it represents the root node of a subtree. VariableType is another NodeClass used to provide type definition for Variables. OPC UA defines the BaseVariableType which all the VariableTypes must be extended from. Among the standard VariableTypes derived from BaseVariableType, there are the DataVariableType and the PropertyType. The former is used to define a DataVariable Node, whilst the latter defines a Property Node.
Relationships may be defined between OPC UA Nodes; they are called References. The ReferenceType NodeClass is used to define different semantics for References. References may be classified in two different main categories: Hierarchical and NonHierarchical. Among the Hierarchical References, the following ones will be used in the paper: HasComponent, Organizes and HasProperty. The HasComponent Reference allows to specify that an OPC UA Object contains another OPC UA Object or OPC UA DataVariable. Organizes Reference allows to organize OPC UA Nodes inside a Folder. The HasProperty Reference is used to link a source OPC UA Node to a target OPC UA Property; the semantics is that the source Node features a property described by the target Node.
Among the NonHierarchical References there are the HasTypeDefinition, HasSubtype, and HasModellingRule. The first one is used to bind an OPC UA Object or Variable to its ObjectType or VariableType, respectively. HasSubtype Reference expresses a subtype relationship between types.
For each OPC UA type, the relevant instances may have some mandatory elements (e.g., a particular Object as component), whilst other elements may be optional (e.g., a certain Property). HasModellingRule Reference allows to point out this kind of information for each OPC UA type. For each Variable or Object (henceforward called InstanceDeclaration) referenced by an OPC UA type Node, a HasModellingRule Reference points to a ModellingRule Object as target Node. A ModellingRule associated to an InstanceDeclaration specifies whether a copy of such InstanceDeclaration must be present or not in every instance of an OPC UA type Node. A ModellingRule Mandatory for a specific InstanceDeclaration specifies that instances of the OPC UA type must have that InstanceDeclaration. A ModellingRule Optional, instead, specifies that instances of the OPC UA type may have that InstanceDeclaration, but it is not mandatory.
OPC UA defines standard graphical representation for both Nodes and References [
33]. Some of them are summarized by
Table 5 and
Table 6.
Very recently, the OPCFoundation released an amendment introducing a new feature in Address Space model called Interface [
34]. An Interface is an ObjectType representing a generic feature that can be used by different Objects or ObjectTypes. HasInterface is a new NonHierarchical ReferenceType; an Object may have more HasInterface References connected to different Interfaces. When an Object references an Interface by means of a HasInterface Reference, it inherits all the InstanceDeclarations exposed by the Interface, following the same rules used for an Object that inherits all InstanceDeclarations exposed by its ObjectType. More details may be achieved in [
34].
In the remainders of the paper, to avoid confusion between Reference in AAS metamodel and Reference in OPC UA, the suffix AAS or OPC UA is added when the context requires to do so. Furthermore, names of Objects will be written between double quotes, in order to be easier distinguishable.
7. Case Study
In this section a case study is presented to the reader, in order to clarify some of the concepts and the mapping rules discussed so far. The case study takes into account an AAS modelling a motor controller; it is a simplified version of the example provided in [
4].
Figure 9 shows the UML of this AAS. In the following, after a brief description of this AAS and the relevant mapping into OPC UA information model, the case study will be clearly defined and discussed.
As shown by
Figure 9, the AAS (named SampleAAS) contains a Submodel (named 123456789) and an asset (3S7PLFDRS35). The Submodel features only a property (NMax). Furthermore, the AAS has a ConceptDictionary (SampleDict) containing a ConceptDescription (NMaxDef).
All the Identifiable entities feature the attribute identification containing a globally unique identifier. Since NMax is a HasSemantics entity, its attribute semanticId contains the identifier of the ConceptDescription defining its semantics, i.e., NMaxDef. In particular, the semantics specifies that the Property value (2000) represents the maximum rotation speed supported by the motor controller, and it is expressed in rpm (revolutions per minute). Even if Submodel is also a HasSemantics entity, the figure does not show the relevant attributes due to lack of space. In this example, the Property NMax is used to show how semantics is mapped in the OPC UA Information Model.
All the attributes containing an AAS Reference are depicted in
Figure 9 with a <<ref>> association. All the names of attributes featuring a composition are depicted using an array notation (e.g., submodel [0], conceptDescription [0]) when pointing to a specific instance of an entity.
In the following, the mapping into OPC UA AddressSpace of the AAS shown in
Figure 9 will be given. The AddressSpace may be organized creating a Folder for each kind of identifiable entity, as discussed in
Section 5.2. Therefore, the Folders “Asset Administration Shells” and “Assets” (shown in
Figure 10) will organize objects mapping the AAS and the asset, respectively; in a similar manner, the folders “Submodels” and “ConceptDescriptions” will organize objects mapping the Submodel and the ConceptDescription, respectively. It is important to point out that these last two Folders are depicted in
Figure 10, but for space reason, their contents are shown in
Figure 11.
All the identifiable entities in the use case are mapped using instances of OPC UA ObjectTypes as discussed in
Section 5.1: AASType for SampleAAS (see
Figure 10), AssetType for 3S7PLFDRS35 (see
Figure 10), SubmodelType for 123,456,789 (see
Figure 11) and ConceptDescriptionType for NMaxDef (see
Figure 11). Since all these ObjectTypes represent Identifiable entities of the metamodel, they point to an OPC UA Interface “IIdentifiableType”, as discussed in
Section 6.1; this is not depicted in
Figure 10 and
Figure 11 for space reason. All these instances feature a property “identification” that contains the relevant identifier of the entity represented.
All the attributes consisting in AAS References (depicted with <<ref>> in
Figure 9) have been mapped using instances of the AASReferenceType ObjectType according to the solution proposed in
Section 5.3. Furthermore, ad-hoc defined Non-Hierarchical ReferenceTypes are used to enhance the representation of AAS References in OPC UA and simplify the browsing of an OPC UA Client, again said in
Section 5.3. The Reference HasAsset in
Figure 10, and the References HasSubmodel, HasSemantics, HasConceptDescription in
Figure 11 are examples of this concept.
All the attributes consisting of composition are mapped as folder objects named using the plural noun of the relevant attribute. Such folders organize objects mapping the entities contained by such composition attributes, as discussed in
Section 5.1. The folders “Submodels”, “ConceptDictionaries” and “SubmodelElements” are examples of what was just said. The first two are present in
Figure 10, but their contents are highlighted in
Figure 11.
The ConceptDictionary SampleDict and the AAS Property NMax shown in
Figure 9 are mapped using instances of ad-hoc defined ObjectTypes as said in
Section 5.1, i.e., ConceptDictionaryType and SubmodelPropertyType, respectively. As seen in
Figure 11, these instances are the Objects “SampleDict” and “NMax”.
Finally, since the ConceptDescription NMaxDef features additional attributes coming from the DST for IEC 61360, an AddIn instance of the DataSpecificationIEC61360Type ObjectType (i.e., “IEC61360 Content” in
Figure 11) is created and connected to the “NMaxDef” object by means of a HasDataSpecification Reference, as discussed in
Section 6.2. Therefore, all the properties of this AddIn instances are filled accordingly to all the relevant values of the ConceptDescription.
Starting from this example of AAS (named SampleAAS, as said before) and its mapping into OPC UA, let us consider a realistic case study consisting of an assembly system. Several models of a certain product are assembled by human operators in the same flow line. It is assumed that the assembly system provides an operator support system (OSS) for the human operators in the assembly line; in particular, the OSS has the main task to provide information to perform the assembly cycle in the correct way as function of the model to assemble. For more details about Industry 4.0-based assembly systems and OSS, the reader may refer to [
36].
In this case study, let us assume that the models of products to be produced are made up by several components to be assembled, among which there is the motor controller considered before in this case study. Different models to be assembled feature a motor controller, but each model requires a motor controller of a given maximum rotation speed. For example, assembly of Model X requires a motor controller with a maximum rotation speed value greater or equal to 2000, whilst the Model Y must be assembled including a motor controller with a maximum rotation speed greater or equal to 3000. For each product arrived to the human operator in the flow line, the OSS must suggest him the right motor controller component to be assembled according to the model of the product received; the OSS must specify an unambiguous id of the product part to be assembled in order to avoid assembling errors by the human operator.
Let us assume the scenario shown by
Figure 12. The OSS includes an OPC UA Client which communicates with an OPC UA Server implementing the mapping of the AAS metamodel shown by
Figure 9. Different instances of AASType “SampleAAS” are present; in the figure only two instances are depicted for space reason, Motor Controller 1 and Motor Controller 2. These instances differ for the NMAX property, as shown by
Figure 12, i.e., the motor controllers represented by these instances differ for the maximum rotation speeds supported.
Let us assume that at a certain moment the OSS has to suggest to an human operator a specific motor controller to be assembled, and let us assume that the model of the product to be assembled requires that that the maximum rotation speed supported must be greater than 1800. The OSS will use the OPC UA Client to realize a search inside the AddressSpace of the OPC UA Server, exploring the available AASs, looking for an AASType “SampleAAS” instance featuring NMAX > 1800.
On the basis of the content of
Figure 9, it is clear that the search in the AddressSpace is based on the knowledge that Maximum Rotation Speed has an identification = “0173-1#02-BAA120#007”.
Starting from folder “Concept Descriptions” (see point 1 in
Figure 11), the object of ConceptDescriptionType type featuring a property “identification” containing the identification “0173-1#02-BAA120#007” is selected. In this case the object “NMaxDef” is chosen (point 2 in
Figure 11). Starting from this Object, the OPC UA HasSemantics Reference is followed in the opposite sense in order to look for Objects of SubmodelPropertyType type. Considering
Figure 11, the object “NMAX” is reached (Point 3 in the figure). On the property “value” it is possible to perform the query given in input. In this case, the condition subject of the query is satisfied. The last step is to give back the id of the AAS, modelling the real motor controller featuring a rotation speed greater than 1800. Starting from object “NMAX” it is possible to reach its container, i.e., the SubmodelType Object “123456789” (point 4 in
Figure 11). Finally, following the OPC UA Reference “HasSubmodel” in the opposite sense it is possible to reach the id of the AAS, i.e., Motor Controller 1 (Point 5 of
Figure 11). This information will be passed to the human operator, in order to realize the correct assembly. 8. Software Implementation
On the basis of all the rationales and mapping solutions provided in this work, authors realized an OPC UA information model, called the “AAS Information Model”, as a proof of concept; it is freely available at [
37]. An extension for the OPC UA SDK in Node.js [
38] has been developed providing new functions for developing OPC UA Server implementing the aforementioned AAS Information Model and validating the rationales provided in this work [
39]. Descriptions of these implementations are provided on GitHub [
37,
39] together with installation guides and demos. The authors would like to point out that the implementations available on GitHub at [
37,
39] are open source and are distributed by the authors under the Apache license version 2.0 [
40].
In order to realize an automatic process able to map a particular AAS into an OPC UA AddressSpace, a console application tool has been implemented. It is able to import an XML-serialized AAS and to generate an OPC UA Server exposing mapped from the AAS metamodel. Such a tool applies some of the main strategies discussed in this work to map AAS into an OPC UA AddressSpace; furthermore, it has been developed taking advantage of the authors’ OPC UA SDK extension [
39]. In the remainder of this section, the same AAS proposed as a use case in
Section 7 has been used as evaluation of the console application, thus of the mapping rules. A file representing the AAS of the previous use case is used as a starting point; it contains the same information depicted in
Figure 9, but in XML format. Information about the XML serialization is available in [
5]. Due to lack of space only a short part of the XML file is depicted in
Figure 13, showing the serialization of the 3S7PLFDRS35 Asset information only.
The console application has been developed as a command line application (CLI) running on Node.js. A command specifies which XML file must be imported. The first step realized by the application consists of the validation of the XML serialization file against the XML schema provided in the specification of AAS [
5]. If the validation succeeds, the application starts a parsing procedure of the XML file. Considering the XML shown in
Figure 13, the application retrieves all the relevant information describing the asset. Such information is used to fill the arguments of a function of the SDK [
39] that creates an instance of the AssetType ObjectType inside the AddressSpace, as depicted in
Figure 10 for the 3S7PLFDRS35 Asset.
This procedure is repeated recursively for every other entity contained in the XML file filling the AddressSpace step-by-step. It is worth noting that most of the mapping rules described in this paper are implemented in the code of the CLI application, whereas strategies for information representation are implemented in the information model.
As a result, the information of the XML file is mapped in the AddressSpace of an OPC UA Server and is made accessible to different clients in the network by means of OPC UA communication. The complete AddressSpace produced in this case study is depicted in
Figure 14; the graphical visualization of its structure shown by the figure has been achieved using the OPC UA client by unified automation available at [
41], connected to the OPC UA Server developed by the authors and maintaining the AddressSpace produced by the mapping process just described.
The reader can notice that the same Folder structure and all the information represented in
Figure 10 and
Figure 11 are present in the AddressSpace because they are automatically and seamlessly generated by the SDK using the information model developed by authors.