Research Article Towards Building Cyberphysical Systems with Agile Architecture

,


Introduction
e progress of engineering and information technologies makes it possible to create very complex anthropogenic systems. e complexity of such new generation of systems results from the increasing of the number of elements, the number of internal and external links, the complexity of behaviour, and the variability of the structure and behaviour of such systems in time.
Modern anthropogenic systems can be defined as complex, multilevel, heterogeneous, distributed, networkcentric and data-centric, and intelligent systems. e implementation of these qualities requires the presence of an information processing component, including large-volume information storage and powerful computers. Tallows consider modern anthropogenic systems as Software Intensive Systems (SwIS) [1].
Modern systems consist of elements of different nature, such as mechanical and electromechanical elements; it can also be natural entities, biological and human entities.
Nowadays, one can observe appearance of such new classes of systems as cyberphysical systems (CPS) and sociocyber systems [2,3].
In other words, one can say that a significant part of complex anthropogenic systems has the property of changing their structure and behaviour depending on the external or internal contexts. Such systems can be defined as variability-intensive systems (VIS) [4,5]. General trends in the development of anthropogenic systems allow assuming that the systems of next generation will be also VIS.
Solving the problem of variability management for complex, multilevel heterogeneous distributed systems is a nontrivial task, especially when reconfiguration decisions are made autonomously at several levels in different subsystems of a distributed system. is article discusses one of the possible approaches for solving the problem of managing variability at the architectural level by using the agile architecture approach (AAA). e investigation is conducted in relation to CPS built on fog platforms [6], which are actively used in the construction of modern large-scale systems. e proposed article includes 13 sections. Section 2 defines such concepts as variability, agility, agile architecture (AA), and their relationship. Section 3 contains the problem statement of the study. Section 4 discusses the current state of the agile architecture systems (AAS) construction technology. Section 5 describes the suggested approach. Section 6 discusses the problem of building an Agile Architecture CPS (AA CPS). Section 7 discusses the main tasks to be solved to support agility in CPS. In Section 8, it is proposed to use the automata representation to describe the mechanisms of agility. Section 9 describes the Agility Support Models (ASM). In Section 10, it is proposed to define 5 maturity levels when building AACPS. Section 11 discusses possible approaches for implementing AACPS. Section 12 provides an example of using AAA. Section 13 contains conclusions on the article.

Variability, Agility, and Agile Architecture
Nowadays, many different terms are used to describe the variability of the structure and behaviour of the systems. In relation to information system, for SwIS and for CPS, such terms as adaptive, flexible, reconfigurable, dynamic, and agile are widely used [4,5,7]. e term agility in Wikipedia is defined as "the ability to change the body's position efficiently" (https://en. wikipedia.org/wiki/Agility). In the IT sphere, this term is also actively used. In relation to SwIS, the term agility can be defined as the ability of a system to adapt to a certain context [5].
ere are three main variants of the term agility use: (i) the use in a broad sense as a synonym of such terms as flexibility and adaptability [7], (ii) relation to the SwIS design process [8], and (3) relation to SwIS architectures [4,5]. It should be noted that the concepts of Agile Process (AP) [8,9] and AA are correlated to each other, although the mechanisms used are different. AP is a process that is focused on working with constantly changing requirements and belongs to the design stage. AAS are systems which are able to adapt to changes in the runtime context.
Recently, instead of the term agility, the term variability is sometimes used [4,5,9]. However, according to the authors of the article, these are different concepts. Variability can be defined as the ability of a system to change its state, and agility can be defined as the ability of a system to respond to a change in state or context.
It should be noted that majority of modern complex systems implement the mechanisms of agility [10,11]. e subject of consideration in this article is AACPS implemented on fog platforms.

Problem Statement
ere are several reasons why we deal with the variability of structure and behavior, the main of which are the following: (i) increase in performance by means of system scaling, (ii) increase in reliability (availability) indicators due to the implementation of the self-healing procedure, (iii) support for intelligent interfaces, (iv) restructuring in order to optimize the functioning, and (v) modernization of the system. e problem of variability management can be formulated as follows. It is necessary to find mechanisms that allow determining the current state of a CPS, to present information in the required form to stakeholders and (or) to form reaction to a change in the structure, behavior of the observed (managed) system (OMS), or a change in the context. e proposed article considers a possible approach for solving the problem of managing variability at the architectural level for multilevel complex distributed heterogeneous CPS.

The State-of-the-Art Agile Architecture Systems
Publications related to AAS can be divided into two groups: publications related to agile architecture systems themselves and publications related to the study of mechanisms that can be useful in implementing AAS. e first group includes early publications on dynamic computers such as [12], publications related to various aspects of adaptation, early publications related to AA [4], and recent publications on the topic [5,11]. All these works are devoted to the consideration of the general principles of AAS building but contain few information about possible approaches to the agility mechanisms realization.
Despite the fact that the concept of AA itself was introduced quite a long time ago, the authors are not aware of works that offer AA models and frameworks.
is article is a further development and generalization of the results of the authors research in the fields of the synthesis of relatively finite automata, the synthesis of knowledge graphs [19,20], and data acquisition systems in distributed heterogeneous CPS [21].

Suggested Approach
e developed AAA is based on the following principles.
(1) e proposed AAA assumes the construction of a multilevel system of models operating in discrete time in terms of discrete states. Each element of the model is a dynamic model of the corresponding architectural element of the model and can be to answer all the requests of all potential stakeholders, which can include both users and subsystems, for example, the agility management subsystem.
e need to move the OMS to a new architectural state (Ast) may be required in the following cases: internal events can occur, such as changes in the structure because of the failure of individual subsystems, the appearance of new subsystems, or suboptimal functioning of the system, when it is necessary, for example, to perform load balancing.
AACPS can be considered as a Context Aware System (CAS) [23]. At the same time, it is necessary to distinguish between static and dynamic agilities. At the development stage, development time agility is implemented, and at the operation stage run time agility is realized.
It should be noted that the proposed approach is close to the Digital Twins approach [24]. It can also be considered as an implementation of the VIS [5] and evolutionary architecture concepts [25] applied to CPS.

Agile Architecture CPS
In recent years, CPS has found increasing practical usage and CPS can be considered as one of the possible areas of application of the proposed approach. It should be noted that CPS can be considered as a design paradigm that is based on the architectural approach to design [26]. To date, significant parts of the existing and projected SwIS are systems consisting of components of different physical nature, i.e., CPS. At the same time, it should be noted that the increase of the level of intelligence of created CPS and the increase of usage of ambient intelligence systems (AMIS) [27] are observed.
e Generalized Structure of the CPS. In the most general sense, modern CPS can be defined as multilevel (multilayer) systems, which are systems of the surrounding intelligence. It should be noted that modern CPS can include many thousands of elements. e generalized structure of the CPS is shown in Figure 1. In general case, CPS consists of 6 levels (layers): sensor level, fog computing level, cloud computing level, CPS level, CPS systems level, and AmIS. e sensor layer, fog layer, and cloud layer correspond to the levels of the IoTreference model [28]. Many CPS are built on the fog [18] platform, and, for CPS fog, the platform is represented as a set of services. e system can consist of an arbitrary number of CPS that can be integrated at different levels (data, applications, and user interfaces). At each level, the models are described using specialized dictionary. Stakeholders interact with the system through the distributed human machine interface subsystems, which support AMI interface [27]. It is necessary to mention that different groups of stakeholders use different Domain Specific Languages (DSL) [29] to interact with CPS and can have concerns correlated with different levels.
e Main Types of Variability that Occur in CPS. Obviously, when using models in run time mode, it is necessary to track changes in the CPS state. e main types of variability in structure, behavior, and context that may need to be monitored when using the model approach are shown in Figure 2. is variability classification can be conceded as adaptation of [30] to CPS and run time agility. Variability can manifest itself both in the structure and in the behavior of an OMS. Changes in the structure and/or behavior can occur for a number of reasons. When using dynamic architectures, this is a normal process. Changes in the structure and behavior of the OMS can be associated with the implementation of contextual or content adaptation in order to optimize functioning. Changes in the structure may be due to malfunctions or modernization of the system, in particular, switching on or off the equipment. us, we can assume that models can be used to solve tracking changes in the structure of the OMS, behavior changes, and tasks of tracking user activities.

Main Tasks to Be Solved to Support
Agility in CPS e implementation of the proposed approach is reduced for solving the following main tasks: (i) building and maintaining a multilevel model in an adequate state, (ii) building a script that implements the procedure for collecting data about the current state of an OMS, (iii) support DSLs using which different categories of stakeholders can communicate with OMS, and (iv) bringing the OMS in line with the model.

Automata Representation of AACPS
Formally, AACPS can be defined as: AACPS � <OMS, OMSMM, SH, I1, I2, I3, I4>, where OMS is an observable and managed system, OMSMM is agility management module (subsystem), and SH is a set of stakeholder groups (not necessarily people) and 4 interfaces. I1 is the interface for maintaining the relevance of the OMS, I2 is the interface for supporting the correspondence of the architectural state of the model and the OMS, I3 is the interface for querying the state of the OMS, and I4 is the interface for managing the OMS ( Figure 3). e following main special cases can be distinguished: (i) the structure and behavior of the OMS being static, (ii) when it is only necessary to monitor the state of the OMS, and (iii) when there is only one user group. In the case when the variability of the structure and behavior is absent or minimal, there is no need to use dynamic models. In this case, models can be built in statics at the design stage based on Model Driven Architecture (MDA) models.
If stakeholders only want to receive data about the state of the OMS, then we are dealing with a DSH [31]. In this case, the control can be carried out via other channels, for example, in manual mode. If there is only one group of stakeholders with the OMS, then models can be built in terms of the corresponding subject area. If there are several different groups of stakeholders who have different concerns, then the task of presenting the model becomes more complicated.
Formally, the interaction of OMS and OMSMM can be represented as interacting automata. e OMS automaton can be defined as OMSA � <InOMSA, OutOMSA, STOMSA, TROMSA>, where InOMSA is a set of input signals, OutOMSA is a set of output signals, STOMSA is a set of internal states, and TROMSA is a function of transitions and outputs. InOMSA is information about events that initiate the transition to a new state. ese can be internal events, external events, or commands to change the state (reconfiguration). OutOMSA is, for the most part, logs. STOMSA is a set of states of the elements that make up the OMS, and these can be elements of different physical nature. TROMSA are the rules, according to which a decision is made to switch to a new state. e rules define FF and they can be of any complexity. e OMSMM automaton can be described as OMSMM � <InMMA, OutMMA, STMMA, TRMMA>, where INMMA are logs coming from OMSA or commands from users. OutMMA is basically the results that are given out according to user requests. STMMA is a set of internal states of an abstract automaton. TRMMA is a function (table) describing transitions between OMSMM states. is function can be quite complex. e output signals can be associated with both states and transitions. e output signals represent the results on the DSL [29].
In general, OMSMM is a distributed system consisting of a set of interconnected nodes (OMSMMN), each of which can be described as OMSMMN � <SE, AM, I, Srv> where SE is the entity being modeled, AM is a model, I is an interface with the OMS, and Srv are model access services. Interfaces are intended for communication with the underlying layers, and services are intended for communication with the overlying layers.
e simulated entity can have any nature. With rare exceptions, the model is a virtual entity. I is interface for communication with the observed object; Srv are supported services.
e interface I can be defined as I � <RQ, ES>, where RQ is a set of requests for data collection, and ES is event streams. e typical structure of the agility support node is shown in Figure 4. e agility support node is a virtual machine that includes the following main elements: (i) Agility Support Models (AM) repository, (ii) AM processor, (iii) DSL processor, (iv) events processor, (v) log request processor, and (vi) control signals generation processor. e AM repository is designed to store AM files that can be presented in different forms. AM processor is responsible for working with models. Events processor is responsible for processing the flow of events, which are presented in the form of logs (L). Log request processor is responsible for the formation and execution of scripts that implement the collection of data necessary for building an AM. is processor sends requests to receive logs (L). Control signals generation processor is responsible for generating management actions for OMS reconfiguration.
e functioning of the agility support node can be organized in different ways [21]: (i) the user request processing is implemented within a single process; with each request, the AM is built from scratch; (ii) there is a separate process responsible for keeping the AM up to date; for each specific moment of time there is an up-todate AM; (iii) a mixed strategy is used; for example, at the upper level, the AM is built in the background mode, and, at the lower level, the model is completed when a specific request appears. e third option is of real practical interest, since it is quite difficult to store and keep up-to-date complete model of a large CPS. us, two parallel processes are implemented in the agility support node: the process of keeping the model up to date and the process which is responsible to realize stakeholder requests. e algorithm for keeping the model up to date: (1) Start the OMS monitoring procedure (2) Receive logs (3) Clean and sort logs (4) If AM correction is required, then continue; otherwise go to item 2 (5) AM correction and go to item 2 Algorithm for processing user requests: (1) Wait for a request from a user (2) Request acceptance and transformation DSL⟶MQL (Model Query Language, the language of the request to the model) (3) Request to the model using MQL (4) If the response is not received, then continue; otherwise MQL⟶ DS transformation and go to item 1 (5) Script synthesis (6) Script execution (7) Construction of the required AM of OMS (8) Request for a new model (9) MQL⟶ DSL and the transition of the item 1 e task of matching the state of the OMS with AM can be defined as the task of obtaining the OMS with the required ASt according to the model, which is AM. If we take into account that each ASt i corresponds to exactly one AM i , then the automaton describing the dynamic structure and behavior, which will be discussed below, can be conceded as a Digital Twins (DT). In this case, each transition is additionally loaded with the reference (Ctr) to the script that is to be executed for transition to this ASt. If for each architectural element of the OMS a kind of a set function is available that can set the element to any valid state and the order of execution does not matter, then the task becomes trivial.

Agility Support Models
As a system of models that meet the requirements for ASM, a two-level model M � <MA, MSB> can be proposed, MA is a model of the upper (architectural) level, and MSB is a model of the lower (structural-behavioral) level. MA describes the OMS in terms of architectural states and MSB in terms of structure and behavior. An MSB can contain an arbitrary number of nesting levels.
e Top-Level Model. is model describes the behavior of an OMS in terms of the change of ASt under the influence of external or internal events (Ev) and control actions (Ctr), which sets the OMS into this state. Using this model, it is possible to describe the AA [7,8] in terms of changes in architectural states ( Figure 5). e transitions between architectural states can be matched with Fitness Function (FF) [25]. e concept of agility assumes that for one system there are several architectures; in the other words, AA system may Journal of Computer Networks and Communications 5 have several architectural states. e transition between ASt occurs under the influence of both internal and external factors. In the first case, we can talk about the implementation of self * mechanisms (self-testing, self-healing, etc.), and, in the second case, we can talk about CAS [23]. As a model describing the functioning, an AA system it is proposed to use a multilevel relative finite state operational automaton (MLRFSA) [15,16], which describes the implementation of agility mechanisms in terms of transitions between architectural states (In the Figure 5, Ev denotes events and Ctr denotes the reconfiguration control signals). e event can be either internal or external. It should be noted that only in the simplest cases the structure of the considered automaton is fully known; most often there is some incomplete knowledge about the structure of the automaton. In this case, it is necessary to solve the problem of an automaton constructing (synthesis). Algorithms of MLRFSA synthesis are described in sufficient detail in the publications of the authors [15,16]. e automaton according to Figure 5 is a MLRFSA operating in discrete space and discrete time [13,32]. is is a class of automata in which the sets of acceptable parameters are, in general, finite only at the interval of one step of behavior. At the same time, it is possible to change the set of valid input, internal, and output states of the automaton, as well as the set of valid functions of transitions and outputs of the automaton; i.e., completely rebuild the automaton.
A MLRFSA state can be described by 10 parameters where d a r is an input parameter vector; d b r is an internal state parameter vector; d c r is an output parameter vector. Functions F b r are the functions that describe conditions of the changing automaton internal state and F c r are the output functions.
e automaton behavior can be described as follows: States d b r , d c r , and d a r and functions F b r and F c r describe automaton at the r-th moment of time and must satisfy the following conditions: e transition from the automaton MLRFSAr to the automaton MLRFSA r+1 at r + 1 moment can be defined as e functions of the automaton transitions from one state to another can be also represented as If many functions are used in the transitions, then the transitions are described as follows: where z and v define the type of functions used in transitions.
To each of the conditions, their statuses can be assigned: main condition, precondition, and postcondition. For preconditions, numbers of key terms under which they are true can be determined, and postconditions define terms on which they are false. If you set all the elements in the conditions to their corresponding predicates P zv0 (F zv0 (g)) and P zv1 (d zv1 ), . . . , P zva (d zva ), which take the value 1 when the variables are defined (true) and 0 otherwise, taking into account the considered relations, the automaton model of the observed object can be described in the form of a structure: linking d S and d w . For practical implementation, described MLRFSA are required to have relevant information about the current state of the system, the changes taking place in the structure of the system, and the context; on the basis of this information, a decision on the transition of the system to another architectural state is made. e MLRFSA synthesis algorithms are considered in detail in [13,14,32].

Lower-Level Models.
e lower-level models are domainoriented architectural models and can include several points of view [33]. e type of model used is determined by what DIK stakeholders want to get about the OMS. It should be noted that large CPS are characterized by the presence of several groups of stakeholders with different concerns. e functioning of SwIS is usually described in terms of structure and behavior [22]. e Structural-Functional Model (SFM) can be used for this purpose. is model is designed to generate models describing the OMS in terms of the structure and implemented behavior in the form of BP. e proposed SFM is a bipartite colored graph and is defined as where OP is the set of operators, L is the set of arcs, COL is the coloring of arcs, GO are the rules for starting operators, SEMO is the semantics of executing operators, STRM is the strategy mask, tk is the set of tokens, TK0 is the initial markup, CSG is the control signal generator, and RMS is the resource monitoring system. OP operators are operators of any level of complexity; the operators are connected by arcs L, which can be colored in one of 4 colors: arcs, through which Ld data is transmitted, Lc arcs, through which control signals are transmitted that allow the execution of OP, Lz arcs, through which requests for the execution of operators are transmitted, signals, and Lr arcs, through which signals about the availability of resources are distributed.
GO are rules for launching operators: where tki is the presence of a type i token at the operator input and STRMi is the i-th bit of the STRM mask.
us, depending on the mask used, there are 16 different ways to check the readiness of operators for execution. is model can be used as a metamodel. On its basis, it is possible to build various kinds of private models that can describe the OMS in terms of both structure and behavior. A more detailed description of this model and how to build it based on log files is contained in [21]. For automatic construction Journal of Computer Networks and Communications of the SFM model, one can use modified Process Mining algorithms [18]. is model is one of the possible models. It should be noted that different models can be used at different levels.
e top-level models are models in terms of which the agility mechanism is implemented, and the lower-level models are, on the one hand, a way to store information about the current state of the OMS and, on the other hand, a source of information for the formation of SFM.

AAA Maturity Levels
When solving real life problems, the proposed AAA is not necessarily used in full. One can define 4 levels of AAA maturity.
Level 0. Systems with a Fixed Architecture. e OMS has a fixed architecture, which is created at the design stage. Reconfiguration at the architectural level is not planned at the design stage. e transition between ASt can be carried out automatically. However, all the ASt are known at the design stage. An architectural automaton can be built in statics at the design stage.

Level 3. Evolutionary Architectures.
e OMS is designed according to the principle of an evolutionary architecture. e transition between ASts can be carried out automatically. At the design stage, all the ASts are not known. In this case, both ASts themselves and individual elements may be unknown. e architectural automaton (OMSMM) is built in dynamics.

Possible Approaches to Implementation
In general, a large-scale CPS model is a system of model systems (SoM), which can be considered as system of systems [22]. Depending on the type of OMS, models can be organized into the SoM in different ways. Different ways of representing ASM can be used at different levels. Figure 6 shows two edge variants of building a SoM. Figure 6 shows a variant when all interactions between the system elements are implemented through the use of ASM, and Figure 6, b shows a variant when deferred processing is implemented and the OMS and ASM interact through a telemetric communication channel and through a database (DB). In reality, there may be a large number of intermediate variants that are most often used in practice.
In Figure 6, the following designations are adopted: P is a physical entity, Li is the i-th level of the OMS, Mi is the i-th level model, and DSL is the interpreter of a domain-oriented language.
One can define three main approaches to the implementation of AM: (i) the implementation of the model, i.e., using JAVA in the form of an object model, (ii) based on using ontologies [34], and (iii) based on using knowledge graphs [19,20,35,36]. Using JAVA to build models allows get minimal delays, but it is very expensive in terms of programming. e use of ontologies and knowledge graphs gives slower solutions but allows using existing tools, such as SPARQL [37]. Since the models are quite complex, it is advisable to implement them as cloud services. Individual domain-oriented model fragments can be placed in the fog layer.
Nowadays, it is preferable to build ASM in terms of knowledge, in particular, using ontologies and knowledge graphs. e issues of automatic ASM construction in terms of knowledge graphs are considered in [19,20].

Case Study
As an example, which illustrates the possibilities of using the proposed AAA in practice, one can consider the crane complexes, which is an element of a flexible production system of an automated assembly and welding site.
is system, in turn, is a part of a manufacturing enterprise with a high level of automation, planning to implement the concept of Industry 4.0 [38][39][40][41].
e existing system is designed to collect and process data from crane systems and is designed for use on production sites, each of which consists of several shop-floors, in which bridge and semicrane cranes work. e cranes are equipped with analog and digital sensors. Analog sensors are used to measure distances between cranes, between trolleys (for double-bed cranes), and between the trolley and the edge of the crane, weight of the load, ambient temperature, motors, temperature of frequency converters, voltage, and current of the power supply network. e discrete sensors include sensors that determine the extreme upper and lower positions of the hook, the condition of the repair gates, the position of the hatch in the cabin, and all fuses in the switch cabinet. Data is collected from all sensors at 250 ms intervals. e total number of measured parameters on each tap is about 560. e total amount of data received from each tap per month is approximately 2 TB.
Based on the data received from the sensors, the tasks of assessing the condition of the cranes and ensuring their operability are solved. In operating mode, different data such as data on the state of the fuses must be collected at a frequency of at least 2 GHz, from the load mass sensors of at least 2 Hz, and from the engine temperature sensors of at least 1 Hz. In the idle mode of the crane, it is necessary to collect information only about the state of the power supply and the ambient temperature. When collecting data, it is necessary to ensure that a delay in data transmission from the cranes to the workplace of the chief mechanic is no more than 5 seconds. e structure of a preexisting CPS is shown in Figure 7. It is a distributed system that includes equipment installed on cranes, workshop equipment, and main (plant) server. e equipment installed on the cranes includes sensors and actuators (S&A). For data acquisition (DA) subsystem 8 Journal of Computer Networks and Communications (DASS), a local controller (LC) and a local database (LDB) are used. e data acquisition process is divided into two stages: data collection from sensors, which is carried out on the crane, and data transfer from the crane to the central server. e list of data to be collected is fixed. Data are collected from the sensors in real time. MIT-SUBISHI MELSEC-Q series industrial controllers installed on the crane are used, providing control of the crane, as well as being a buffer for data collected from sensors. e internal memory of the controllers is accessed via the Seamless Message Protocol. e crane also hosts a single-board ODROID computer for data transfer from LC to ODROID; an Ethernet communication channel with a bandwidth of 100 Mbit/s is used. is channel also transmits commands to the control mechanisms of the crane. e channel provides high quality communication but has limited bandwidth. Overloading the channel can lead to the loss of control commands and cause failures in the operation of the crane. e data are collected by theODROIDC3 single-board computer. ODROID C3 has sufficient computing power to poll the registers at the required frequency. e collected data are placed in the LDB installed on the crane.
Data transfer from the LDB database to the central server can be carried out via a Wi-Fi communication channel or by an operator. e use of the Wi-Fi channel is problematic due to the high level of electromagnetic interference from welding and AC sources installed in the shop-floor. On average, the ratio of the number of lost and transmitted packets is 1 : 5. Data collection by the operator involves the use of the operator's tablet. e software installed on the tablet allows receiving data from the LDB over the radio channel and caching it on the tablet. e range of the radio channels does not exceed 20 meters, which requires the operator to be located near the crane.
is system can be attributed to the maturity level 0, since it is actually a system with a fixed architecture.

Problems.
is CPS was in trial operation for some time, according to the results of which the owners formulated the following problems: (i) insufficient amount of collected data, (ii) long delays in obtaining the data by decision-makers, (iii) low data quality, and (iv) high total cost of ownership (TCO). e enterprise owners have plans to implement a system that meets the industry 4.0 standards, including usage Digital Twins (DT) technologies. But, nowadays, the list of features which are to be realized is absent. e analysis showed that in order to realize Industry 4.0 ideas it is necessary to achieve at least agility level 3. In addition, the owners of the system have plans for building and using the corporate knowledge graph, which is also needed to be taken into account when working on the modernization of the system.
A more detailed analysis of these problems showed the following.
e insufficient amount of data is collected due to the following reasons: (i) user requirements for the composition and quality of the data collected are constantly changing; (ii) users cannot say with certainty what data they need in the future.
e reasons for the three remaining problems are the very high level of electromagnetic interference caused by the presence of powerful welding equipment, which does not allow realizing an effective data exchange between the mobile crane and the workshop server. In the existing system, an operator with a tablet goes to the crane and takes data via Wi-Fi. Using this mode leads to unpleasant consequences: (i) there will be large delays in receiving data, while some of the data may become outdated, and (ii) a part of data may be lost due to buffer overflows if the operator with the tablet does not have time to pick up them.
If you want to increase the amount of data being captured, it is necessary to increase the buffer size. e requirement to have a human operator responsible for data collection increases the TCO. e analyses of these problems have shown that the root cause of the problems is a lack of agility.
us, the solution of the problem of improving the efficiency of the system operation was reduced to solving 2 problems: (i) the problem of an agile system organization and (ii) the problem of implementing effective interaction between the crane controller and the workshop server.
To solve these problems, the following main decisions were made: (i) to increase the level of agility, it is proposed to use the model approach described above, (ii) it is proposed to modify the structure of this system and use the concept of edge (fog) computing, and (iii) to solve the problem of excluding the human operator from the data transfer process with a tablet, it is proposed to use clustering mechanisms.

Suggested Solution.
For DA on the crane, an additional intermediate link (fog node) "ARM CPU" was developed, which provides data collection management (Figure 7). e crane additionally houses a controller based on the APM processor, which performs the functions of a fog node. In the repair shop, controllers are also placed, which perform the functions of fog nodes. In order to reduce the volume of collected and stored data, fog nodes use a priori information from the low-level model (LLM) about the object from which the information is collected, the types of sensors are installed on it, and the dynamics of changes in the measured values, i.e., models of the observed objects, are stored. We can assume that the controllers placed on the cranes form the mist level and the controllers placed in the repair areas form the fog level. e initial scheme assumed measurement of parameter values with a certain sampling step, representation of data in binary form, and their storage in the database. To reduce the data stored in the database, the new scheme detects changes in values, identifies ascending and descending edges, and records the time when these events occur. When collecting data using analog sensors, dynamic changes in the sampling rate are provided depending on the state of the crane. e sampling rate is reduced after the system analyses the rate of change of the measured values over a fixed period of time.

A Cluster-Oriented Model for Collecting Data from
Cranes. To solve the problem of reducing the response time, it is proposed to use the cluster model [42]. e traditional data collection scheme involves direct data transmission using Wi-Fi. e Wi-Fi communication channel in the workshops has low reliability due to the high level of interference. e data transfer rate is inversely proportional to the distance to the access point. Data transfer to the server starts when the threshold value of the accumulated data is reached. With this scheme, the data transfer rate is calculated as c (l) � k/l, where k is the gaintransfer rate. e structure of fog DCS is shown in Figure 8. To ensure fast and reliable DA without the involvement of an operator, a cluster scheme for collecting data from cranes was developed. In each shop-floor, Wi-Fi access points are installed in the repair areas, which act as relay nodes. When a certain amount of collected data is reached on the tap (250 MB), data is transferred from the tap to the head element of the cluster (the crane having the minimum distance to the access point). If there is no possibility of communication with the head element of the cluster (no line of sight), data transmission is carried out through nodes (cranes) located in the visibility zone. Access points are connected to the in-shop network via Ethernet. When the crane is moved to the repair area, the crane data is transmitted to the relay node (Wi-Fi access point). High-level models are realized as distributed knowledge graphs and are located on repair areas, on workshop servers, and on the main server.
As a result of the use of the model approach and the transition to the fog structure, the following problems were solved: (i) providing the ability of expanding the list of collected parameters through the use of high-level model and (ii) the use of low-level model which has halved the amount of data collected. e use of clustering mechanisms allows solving two problems: (i) reducing the response time for data collection from tens of minutes to units of seconds and (ii) excluding a human operator from the DA process. e use of these solutions allowed achieving level 2 of the maturity model because only a limited number of models are available.
In the described above example, the benefits obtained are the reduced data access time (reduced response time) and the reduced TCO, since the transition to new equipment is simplified and opportunities for the transition to systems corresponding to the ideas of Industry 4.0 open up. e further direction of development is associated with the transition to DT technologies [40,41], while it is planned to actively use the created models. It should be noted that the joint use of Industrial Internet of ings paradigms leads to the need to create dynamic DT, but it is a subject of separate investigations.

Conclusion
Using the proposed AAA to CPS implementation allows solving a number of important problems, such as reaching a new level of complexity of the created anthropogenic systems and solving problems of increasing the level of service availability. It should be noted that the paper considers the application of AAA to the construction of the large-scale VIS CPS, while this class of systems is considered as an example of complex heterogeneous systems. e idea of the proposed approach is that the system has several architectures (architectural states) and it is possible to switch between architectural states. is is a core idea of all agile architecture approaches. Our contribution is that we show how it can be done.
Our approach can also be considered as one of the possible implementations of the DevOps approach to design. us, there is an opportunity to get benefits in the TCO terms. Performance gains can be obtained if we consider agility as an approach to reconfiguration. In this case, the gain can be obtained through contextual and (or) content adaptation. e possibility of implementing adaptation mechanisms makes it possible to increase the level of reliability.
A necessary and sufficient condition for using the proposed model approach is a sufficiently high complexity of the structure and behaviour of OMS that have high structural dynamics and adaptive behaviour.
Under these conditions, the use of the model approach reduces the response time to a request for the status of the OMS. In addition, the presence of model knowledge about the past states of the system allows determining the root causes of events and predicting future states of the system to implement proactive management. In addition, the availability of knowledge about past states allows using learning mechanisms.
As the main subject of our future R&D, we see the problem of agile architecture cyberphysical systems security. Nowadays, it is not possible to state unequivocally that agile architecture systems provide a higher level of security compared to traditional architectures. In principle, it is possible to consider the possibility of transition to an architectural state that provides a higher level of security, but this requires assessing the level of security in terms of architecture and building a security model for each architectural state. e authors failed to find adequate approaches in the available sources. We plan to investigate the agile architecture system security and develop architectural tactics for improving security.
Data Availability e data are gathered from crane complexes, which are an element of a flexible production system of an automated assembly and welding site. Provided data files contain volume of data in GB produced by each of the cranes. e data used to support the findings of this study have been deposited in the repository (https://zenodo.org/record/ 5109526#.YPfeXXUzY5k).

Conflicts of Interest
e authors declare that they have no conflicts of interest.