Keywords

1 Introduction

Cyber Physical System (CPS) [1] involves the integration of the Cyber World and the Physical World. The evolution of Cyber Physical Systems began with the embedded systems [2]. Embedded systems are information processing systems that are embedded [3] into a larger product like machines or devices [4, 5]. Some examples of embedded systems can be found in the automotive sector when it comes to safety systems like anti-lock braking system (ABS) to regulate the brake force or the automatic four-wheel drive to increase traction or the airbag system that has a sensor that notices the crash and an actuator triggers the release of the airbag. Another example can be the traffic lights where pedestrians press a button to demand green light. So the term embedded system is used for a hardware and software system which is connected with the outside world through sensors and actuators to handle a distinct task [6, 7]. Embedded systems are followed by networked embedded systems. In the networked embedded system, a number of embedded systems get connected with each other and integrated into a wider context [8]. For example, a car, for instance, can be seen as an integrated control and information system where ABS, climate control, gearbox, speed control information and the motor control get connected to a system. Another example would be autonomous aviation. When the pilot switches on the autopilot, then the engine, the position and the speed of the plane need to be controlled. Also the actuators trigger adjustments to meet the settings of the autopilot [9, 10]. These early form of Cyber Physical Systems can be seen as networked embedded systems that are connected with each other through the internet. In this way, the physical world and the virtual world are merging as shown in Fig. 5.1. That’s why they are called Cyber Physical Systems [11]. So, for example, cars in a city which can be seen as embedded systems share physical data like speed or distance with other cars through the internet, we could use these data to make road transport much more intelligent. It would be possible to improve traffic flow or to reduce accidents.

Fig. 5.1
figure 1

IoT-Cloud infrastructure

Cyber Physical Systems consist of physical components [12] and cyber components as shown in Fig. 5.1, that’s why we call them cyber physical [13]. Actually, all Cyber Physical Systems are based on an information processing computer system which is embedded into a product like in a car, plane or other devices. These embedded systems do not stand alone anymore, they share their data via a communication network like the Internet with cloud computing [14]. This way the data from many embedded systems can be collected and processed in the cloud [15]. Connected embedded systems can be controlled decentralized via computational unit where data can be processed automatically or by the human–computer interface.

CPSs and IoTs have become the technology of future [16]. It is the base of Industry 4.0. The expansion of connected CPSs with us over the years is shown in Fig. 5.2. In 2005, when Mobile Era started, humans were connected to only/mostly three devices like Mobile, Computer, and Tablet through the Internet or other technologies.

Fig. 5.2
figure 2

Expansion of connected devices

In the IoT-Era, started in 2015, we own as many as 10–15 electronic devices ranging from wearables to non-wearables. Now if we go towards future, there can be more than 100 connected and concurrent Cyber Physical Systems and all over the world 100 Billion concurrent Cyber Physical Systems & sub-systems can be connected in the year 2025 and will keep on increasing over the years. There is a high probability that all the sensor devices won’t work individually and will be dependent on other devices as well. For the sake of simplicity, we can consider any number of examples of a big Cyber Physical System like Airplane or Factory, where the Cyber Physical System is the combination of a lot of sub-systems or sensors. All the sensors/sub-systems need to work in tandem to produce an appropriate input for the control server. If there is any error in that input, then the decision taken by the control system will go wrong and can create any big damage to the whole system. Apart from errors, if the sensed data is not synchronized and properly interleaved considering time as a prime factor then it may create a wrong input for the processing systems and feedback results can be severe.

There are many research areas and challenges related to those areas that are associated with Cyber Physical Systems [17, 18]. Some broad areas are shown in Fig.~5.3. Sensors Network (Wired or Wireless), their networking, writing software on different levels, controlling sensor devices with actuators, building information theories for data manipulations or aggregations, and last but not the least writing formal methods in computer science to model and analyse the CPSs in a better way [19] are some major research areas and challenges related to CPSs [20]. All the areas are merged into each other and research required careful effort while solving one issue. For example, while solving issues related to ground level implementation, issues like coordination between different sub-systems [13, 21], synchronization between different sub-systems [22], aggregation of data depending upon the capacity of network, requirement of controlling through feedback loops, delay-tolerance of system in case of real-time system [23] must be taken into consideration as failing in any of the other related part can make the whole system collapse [5]. From the next section onwards, many of the fine-tuned research issues and solutions will be discussed through analytical modeling and intuitive ideas.

Fig. 5.3
figure 3

Formal areas and challenge in CPSs

For Cyber Physical Systems, there are many fields of applications [24]. Cyber Physical Systems can be used for the energy provision in manufacturing to optimize production processes, for assisted living and also in healthcare, etc. Structured Cyber Physical Systems such as Wireless Sensor Networks (WSNs), Medical Monitoring, Smart Grids, Process Control Systems, Robotics Systems, Auto-Pilot Avionics, etc. [25, 26] are subjected to intense research and development. Efforts are underway to build various special purpose CPSs, without any disciplined effort to innovate theoretical principles required in their analysis and design. In the past few years, control theorists began to intensify research efforts to model and analyse special purpose, structured CPSs [27]. When CONCURRENT Cyber Physical Systems evolve on multiple time scales, synchronizing such systems is an important problem. One interesting solution to this problem is Tensor State Space Representation (TSSR) for modeling and analysis of CONCURRENT Cyber Physical Systems [28]. The literature on dynamical systems [29], modeling of concurrent systems received limited interest. It is clear that if concurrent CPSs need to be analysed, taking CONCURRENCY & SYNCHRONIZATION into account is essential.

The analysis of concurrent and structured CPSs requires tractable models of interconnected dynamical systems [30, 31]. Thus, theoretical efforts (modeling and analysis) related to CPSs are actively pursued by many researchers [32]. Also, design and implementation of prototype CPS are underway at many institutions across the world [33]. The unification of CONTROL, COMMUNICATION and COMPUTATION (Fig. 5.4) functions in multi-dimensional linear dynamical systems have been discovered and formalized. Specifically, optimal control tensors, optimal codeword tensors, optimal logic function tensors are synthesized as the stable states of multi-dimensional neural networks. Furthermore, the synchronization and temporal semantics are absolutely essential for the control of CPSs evolving on Multiple Time Scales. Thus, the concepts for handling concurrency and time scales are inevitable in the design and implementation of Cyber Physical Systems. The unified theory provides new insights into the global research activity for the design and analysis of concurrent multi-dimensional linear systems evolving on multiple timescales. Also, it will help the research organizations and industries to build special case CPSs.

Fig. 5.4
figure 4

Joint design of communication, control and compute systems in CPSs

From systems’ viewpoint, we have an interconnected network of linear/nonlinear/hybrid/periodic/aperiodic/distributed/hierarchical dynamical CPSs evolving on multiple time scales [34] (with several feedback loops from control theory viewpoint) [35]. These dynamical systems could be loosely coupled (Buildings’ Sensor Networks) or tightly coupled (Wireless Body Area Networks). Some approaches to representing [33] concurrent linear dynamical systems and synchronization of such systems evolving on multiple time scales were discussed in the next section. For instance, a Wireless Body Area Network (monitoring temperature, blood pressure, heart’s electrical activity (ECG), brain’s electrical activity (EKG), ultrasound, brain imaging-CAT/MRI/FMRI) involves current periodic/aperiodic, linear/nonlinear dynamical systems [36] evolving on multiple time scales. Thus, such a network of Cyber Physical Systems naturally presents important challenges for Smart Hospitals [37, 38]. It is realized that in most such Cyber Physical Systems, in-network distributed computation takes place. Decision fusion takes place at various levels of hierarchical network of Cyber Physical Systems.

Analytical approach to design, monitor, maintain such dynamical systems exists to some extent in the available literature [39]. But, several interesting new challenges naturally arise and need extensive research efforts. For instance, fuzzy logic-based decision support systems present new research challenges. Coming sections in the chapter are going to address some of the important issues related to Concurrency and Synchronization in Structured Cyber Physical Systems.

2 Concurrent Cyber Physical Systems: Modeling

2.1 Concurrency in Cyber Physical Systems

Concurrency is the phenomenon of things to happen in parallel in a system [40]. Cyber Physical System can have many subsystems running in parallel. If they are non-interactive, then there is no need for concurrency control. But if they interact and depend on each other, then serious concurrency control is required. In most Cyber Physical Systems, several physical/physiological processes are concurrently evolving in time on different timescales. For instance, Wireless Body Area Networks (W-BAN) (e.g. sensors monitoring temperature, blood pressure, glucose level, ECG, EKG, etc.) are evolving on different time scales and the information fusion occurs on different time scales. Coordinating and analysing data generated by such concurrent Cyber Physical Systems is extremely important. Research related to Concurrency Control in Computer Science will provide useful insight into designing and coordinating Concurrent CPSs. It should be kept in mind that several new research issues naturally arise in designing and analysing Concurrent CPSs.

Classifications of Concurrent CPS:

  1. 1.

    Discrete/Continuous Time

  2. 2.

    1-D/M-D: Input–Output state space representation

Section 5.2.2 explains the solution for maintaining concurrency in Cyber Physical Systems and Sub-systems based on these classifications.

2.2 Coordination and Maintenance of Concurrent Cyber Physical Systems

The basic characteristic of Cyber Physical and Embedded Systems is dependency. The key reason is that whatever we do in our information processing, it has an immediate impact on the physical environment. So in case, we do something wrong, we might cause harm to some objects, we might cause harm to people, and that has to be avoided under all circumstances. So, it’s not like the office automation where in case there is a problem with some program, we just start the computer again. We have to make sure there will be no harm caused due to CPS.

Cyber Physical and Embedded Systems must be dependable and this comes in a variety of flavours and in a variety of aspects. One of the important aspects is the maintainability which takes into account that systems might fail, and if they fail it should be possible to repair these systems and it shouldn’t take too long. So, therefore, we are defining maintainability where maintainability is defined as the probability of a system working correctly t time units after an error occurred. Then as a third aspect, we have availability. Availability is the probability of a system working at a particular time. So, for example, let’s suppose that we have a system which very predictively works for 999 h and then fails for 1 h and then works again for 999 h and then fails again. So, such a system would have an availability of 99.9%.

Coordination is must in [41] Concurrent Cyber Physical Systems to make them maintainable and available 24 × 7. If the concurrent systems or sub-systems lack coordination between them, then the probability of failure increases and on the other hand probability of availability decreases.

2.3 Design Issues: Concurrent CPSs

Digital integrated circuits are used to realize Cyber Physical System which can be a combinational, sequential or hybrid circuit as per requirement. Combinational integrated circuits can have processing delay at each gate and propagation delay as well. Depending upon the application and its tolerable delay, the design of the system can be verified for meeting the daily requirement of the system. In the sequential Integrated circuit as well, the delay can be calculated at design time and it can be checked that it is meeting the delayed threshold or not? In the sequential circuit, the current output depends upon the past Inputs and outputs and finite state machine associated with such circuits help in finding average tolerable delay. For meeting the requirement of delay and other constants analytical or simulation tools should be used and processor competition power should also be taken into consideration. So we require a tool for digital circuits’ performance prediction.

From the present Cyber Physical Systems’ implementation, it can be easily observed that temporal semantics are not taken into consideration while designing the software system for any CPS. Most of the available processors run the procedure sequentially so to achieve parallelism in concurrent Cyber Physical Sub-systems, we require careful interleaving of different procedures together [42]. Having multiple hardware processes makes the concurrency task easy but it makes interactions very complex. Involvement of several layers of software, communication between running tasks, separate timing and clock in different processes always make it hard to achieve concurrency on the hardware level. So it’s always better that we do this task in software. In software subsystem, it is required to calculate the worst-case execution time. It gives an idea that the system can meet the critical real-time deadlines while designing the Cyber Physical System.

Further, in this section, we are going to discuss modeling method for linearly interacting concurrent Cyber Physical Systems in one/two/multi-dimensions. It is done by stacking the states of concurrent Cyber Physical Systems in different dimensions. Modeling Method can also be generalized for nonlinear concurrent CPSs as well.

2.4 Modeling Linear Concurrent CPS

Equation (5.1) represents the concurrent physical processes happening at the same time. Their state is represented as a scalar function of time.

$$ \left\{{p}_i(t)=1\le i\le N\right\} $$
(5.1)

Equation (5.2) represents these physical processes as an N-dimensional vector. It can be seen as the state of all the concurrent coupled scalar valued processes. It is advantageous in examining multiple inputs and outputs in a linear or nonlinear, time-varying or invariant system.

$$ P(t)=\left[\begin{array}{c}{p}_1(t)\\ {}{p}_2(t)\\ {}\vdots \\ {}{p}_{N-1}(t)\\ {}{p}_N(t)\end{array}\right] $$
(5.2)

If input of systems is represented as I(t), then

$$ \frac{d}{dt}P(t)={f}_1\left(P,I,t\right) $$
(5.3)
$$ Q(t)={f}_2\left(P,I,t\right) $$
(5.4)

Equations (5.5) and (5.6) represent the concurrent systems when they are time-varying and Eqs. (5.7) and (5.8) represent when they are time invariant.

$$ \frac{d}{dt}P(t)={X}_1(t)\ P(t)+{X}_2(t)\ I(t) $$
(5.5)
$$ Q(t)={X}_3(t)\ P(t)+{X}_4(t)\ I(t) $$
(5.6)
$$ \frac{d}{dt}P(t)={X}_1\ P(t)+{X}_2\ I(t) $$
(5.7)
$$ Q(t)={X}_3\ P(t)+{X}_4\ I(t) $$
(5.8)

For the linearly coupled systems, systems are represented as a vector-valued state rather than scalar valued state. \( \bar{M}(t) \) (Eq. 5.9) is the NxN state matrix of coupled concurrent systems. Equation (5.10) and \( \bar{A}(t) \) given in Equation (5.11) is the output matrix linearly coupled concurrent system. Similarly Eqs. (5.12) and (5.13) show the same for time invariant concurrent systems. Here, concurrent processes’ state is shown as vector value. The linear coupling matrices X 1, X 2, X 3, X 4 are homogeneous for \( \bar{M}(t) \).

$$ \bar{M}(t)=\left[{S}_1(t):{S}_2(t):{S}_N(t)\right] $$
(5.9)
$$ \frac{d}{dt}\bar{M}(t)={X}_1(t)\ \bar{M}(t)+{X}_2(t)\ \bar{I}(t) $$
(5.10)
$$ \bar{A}(t)={X}_3(t)\ \bar{M}(t)+{X}_4(t)\ \bar{I}(t) $$
(5.11)
$$ \frac{d}{dt}\bar{M}(t)={X}_1\bar{M}(t)+{X}_2\ \bar{I}(t) $$
(5.12)
$$ \bar{A}(t)={X}_3\bar{M}(t)+{X}_4\ \bar{I}(t) $$
(5.13)

Equations (5.14) and (5.15) show the state space representation of discrete time concurrent Cyber Physical Systems/Sub-systems. Same way state space representation of time-invariant Cyber Physical Systems in discrete time can be generated.

$$ \bar{M}\left(x+1\right)={X}_1(x)\ \bar{M}(x)+{X}_2(x)\ \bar{I}(x) $$
(5.14)
$$ \bar{A}(n)={X}_3(x)\ \bar{M}(x)+{X}_4(x)\ \bar{I}(x) $$
(5.15)

Instead of coupling matrices, 3D arrays can also be used to the present homogeneous linear concurrent systems rather than using coupling matrices {X 1, X 2, X 3, X 4}. Outer product computation using tensor “X” and “S” is given below. It will generate a 5D array “R”.

$$ {X}_{i_{1,}{i}_{2,}{i}_3}.{S}_{j_{1,}{j}_2}={R}_{k_{1,}{k}_{2,}\ {k}_{3,}{k}_{4,}{k}_5} $$

Equations (5.16) and (5.17) show the state space representation of heterogeneous linear Concurrent Cyber Physical Systems. They are required to be represented using multi-dimensions rather than single dimension so a matrix or a 3D array or a multidimensional array (tensor) is used to represent such states. Systems can be in discrete or continuous time as well. Here discrete time is taken into consideration.

$$ S\left(x+1\right)={X}_1(x)\ S(x)+{X}_2(x)\ I(x) $$
(5.16)
$$ T(n)={X}_3(x)\ S(x)+{X}_4(x)\ I(x) $$
(5.17)

For multidimensional linear Cyber Physical Systems, Eqs. (5.18) and (5.19) are evolved as shown below. Here X 1(x) is a state coupling multidimensional tensor presented with the order 2r. S(x + 1) is the system state at ‘x + 1’ discrete time index. Similarly S(x) is the state at ‘x’ time index. X 2(x) is the input coupling multidimensional tensor with the order represented as ‘r + 1’. T(x) is the multidimensional output tensor with the order represented as ‘x ‘. I(x) is the varying multidimensional inputs answer with the order ‘l’. X 3(x) and X 4(x) are the multidimensional tensors with the orders ‘s + r’ and ‘s + l’ respectively, used as tenses to the output dynamics.

$$ {S}_{i_1,\dots, {i}_3}\left(x+1\right)={X}_{({i}_1,\dots,{i_r}_{j_1,\dots,{j}_r})}(x).{S}_{j_1,\dots .,{j}_r}(x)+{X}_{({i}_1,\dots, i{,}_{j_1,\dots, {j}_l})}(x).{I}_{j_1,\dots .,{j}_l}(x) $$
(5.18)
$$ {T}_{q_1,\dots, {q}_3}\left(x+1\right)={X}_{({q}_1,\dots, {q_s}_{j_1,\dots, {j}_r})}(x).{S}_{j_1,\dots .,{j}_r}(x)+{X}_{({q}_1,\dots, {q_s}_{j_1,\dots, {j}_l})}(x).{I}_{j_1,\dots .,{j}_l}(x) $$
(5.19)

3 Synchronization of Concurrent Cyber Physical Systems

3.1 Networked Cyber Physical Systems: Synchronization

The approach for synchronizing the Cyber Physical Systems discussed earlier requires complete knowledge of system dynamics. In many [43] CPS, the dynamics are not completely/perfectly known. For synchronization of such systems, the following approach could be utilized.

We need to estimate the maximum delay involved in knowing the output for worst case input (it should be noted that the system could be implemented in software) [44, 45]. The idea is best illustrated by a parallel connection of software/hardware systems. The systems require processing delays (for worst case input) which are all not necessarily equal.

Hence, the system to which the outputs of parallel systems constitute input must receive all the inputs in a synchronized manner. Thus, as shown in Fig. 5.5, delay buffers are necessary. In general, based on the network topology, synchronization is achieved by optimally buffering/delaying the inputs/outputs in an intelligent manner [46, 47]. Such an approach is already utilized in some robotics applications, for instance, Critical Path Method (CPM) is well known. Synchronization of CPS should be concentrated on the following classifications:

  • Replicated Decoupled/non-interacting CPSs

  • Replicated Coupled/interacting CPSs

Fig. 5.5
figure 5

Delay buffers in parallel systems

3.2 Clock’s Synchronization: Multidimensional CPSs

As most of the physical processes in Cyber Physical Systems happen at multiple time scales [48, 49] the mark distributed coupled linear CPSs on different time scales [50]. Representation of search Cyber Physical Systems and their respective States can be represented as given in Eqs. (5.20), (5.21), and (5.22).

$$ \left[\begin{array}{c}{p}_1(x)\\ {}{p}_2(x)\end{array}\right]=\left[\begin{array}{cc}{r}_{11}& {r}_{12}\\ {}{r}_{21}& {r}_{22}\end{array}\right]\left[\begin{array}{c}{p}_1\left(\frac{x}{t_1}\right)\\[5pt] {}{p}_2\left(\frac{x}{t_2}\right)\end{array}\right]+\left[\begin{array}{cc}{s}_{11}& {s}_{12}\\ {}{s}_{21}& {s}_{22}\end{array}\right]\left[\begin{array}{c}{q}_1\left(\frac{x}{u_1}\right)\\[5pt] {}{q}_2\left(\frac{x}{u_2}\right)\end{array}\right] $$
(5.20)

Dynamics of linearly interacting concurrent Cyber Physical Systems on multiple time scales are represented in Eq. (5.20), where {t 1, t 2, u 1, u 2} is a scalar value related to discrete time and happening on separate time scales. The value is >1 and they are coupled.

$$ \mathrm{LCM}\ \left\{{t}_1,{t}_2\right\}=u\ \mathrm{and}\kern0.50em {x}^{\prime }=\frac{x}{u} $$
(5.21)

LCM of {t 1, t 2} is calculated in Eq. (5.21).

$$ \left[\begin{array}{c}{p}_1\left({ux}^{\prime}\right)\\ {}{p}_2\left({ux}^{\prime}\right)\end{array}\right]=\left[\begin{array}{cc}{r}_{11}& {r}_{12}\\ {}{r}_{21}& {r}_{22}\end{array}\right]\left[\begin{array}{c}{p}_1\left({f}_1{x}^{\prime}\right)\\ {}{p}_2\left({f}_2{x}^{\prime}\right)\end{array}\right]+\left[\begin{array}{cc}{s}_{11}& {s}_{12}\\ {}{s}_{21}& {s}_{22}\end{array}\right]\left[\begin{array}{c}{q}_1\left({f}_1{x}^{\prime}\right)\\ {}{q}_2\left({f}_2{x}^{\prime}\right)\end{array}\right] $$
(5.22)

After applying Eq. (5.21) to Eq. (5.20), we got Eq. (5.22). A common global clock can be defined using LCM of {u, t 1, t 2}. It solves the problem of synchronization in Cyber Physical System by defining the system on a single time scale.

4 Temporal Semantics: Design of Cyber Physical Systems

Design issues related to embedded systems naturally provide insights into the choices of hardware and/or software systems employed in CPS [51, 52]. But various emerging CPSs naturally require time-critical guarantees on the processing of the data generated by the Concurrent Cyber Physical Systems evolving on different time scales [53]. The research related to REAL TIME OPERATING SYSTEMS (RTOS) will provide interesting insights into providing time-critical guarantees on results generated by various sub-systems in CPSs. Thus, the design of SOFTWARE SYSTEMS must necessarily ensure that temporal semantics [54] are taken into account. Existing programming abstractions (paradigms) must necessarily be redesigned to ensure that real-time performance guarantees are provided.

4.1 Classification of Cyber Physical Systems (CPSs)

One possible classification of Cyber Physical Systems (CPS) is [55] (Fig. 5.6)

  • Real-Time CPS and

  • Non-Real-Time CPS

Fig. 5.6
figure 6

Real-time and non-real-time CPSs

A hard real-time system is one way or the computation has no value whatsoever if the time constraint is not met [56, 57]. Examples are control systems for industrial processes, Air Traffic control, and vehicles’ subsystem control, etc. [58, 59]. The soft real-time system is the one having the property of timeliness of a computation where the value of computation decreases according to its tardiness. Examples are data acquisition systems, telecommunication, internet video, VoIP, etc. Non-real-time systems are the one having no time deadline at all to complete any task. If there is one, then failing to meet that deadline doesn’t affect the system at all. One example is a computer simulation.

Considering Real-Time CPSs, deadlines are of two types [60]:

  • Those which can be met with software/hardware resources.

  • Those which can’t be met. This can happen and there is no hope, e.g. Disaster.

Since any CPS involves hardware and software sub-systems [61, 62], it is essential that these sub-systems meet the time-critical deadlines. Otherwise, such real-time CPS will be unable to meet the performance guarantees essential for the operation of such systems.

4.2 Real-Time CPSs: Temporal Semantics

4.2.1 Goal: Optimal Utilization of Software/Hardware Resources to Meet the Time-Critical Deadline

We first consider hardware subsystems. Since any CPS involves the integration of cyber world and physical world, most of the time a sensor/transducer (wired or wireless) is essential. Most sophisticated sensors have (Fig. 5.7) (a) Transducer; (b) Communication unit (transceiver in the case of wireless sensors), (c) Computation unit, (d) Analog-to-Digital Converter, (e) power unit, etc.

Fig. 5.7
figure 7

Sensor node architecture

The current state of technology determines the speed of A-to-D converter. It imposes units on how fast digital signal is generated from the analog signal. Such technological limitations must be kept in mind when a CPS is designed. In effect, only currently realizable (technology wise) time critical deadlines can be met in current CPS. It should be noted that through “intelligent” utilization of available resources (e.g. time, memory, processors, etc.), sometimes critical deadline can be met. We illustrate an innovative idea which enables meeting temporal deadlines related to computation at the sensor.

We first state the problem of time-critical computation problem [63, 64] at a sensor/embedded system and how it can be solved through intelligent computation. Consider a temperature sensor monitoring a phenomenon and is required to locally compute a function such as mean, min, max, etc. Specifically, minimum fusion function needs to be computed within a “Critical Time”, e.g. T 0. It is clear that as the number of sensed samples increases, the computation time with existing computation hardware proportionately increases. We propose the idea of TEMPORAL DIVISION OF LABOUR (Fig. 5.8), i.e. as and when the sensed temperature data becomes available locally the fusion function is immediately computed and stored in memory (so that a large number of samples are not accumulated). Thus, proactive intermediate computation of fusion function and storage of local fusion function values can be utilized to efficiently compute the fusion function over a larger timescale. This approach enables the sensor to meet the critical time deadline. In this case, “efficient” utilization of computing resources potentially enables the deadline to be met.

Fig. 5.8
figure 8

Temporal division of labour

Example: MEAN of N samples -> ‘T 0’ Time. Buffer samples on a finer time scale ‘d 0’ store the value, i.e. mean on a Finer time scale Nd 0 samples on a Coarser timescale takes more time.

4.2.2 Effective Idea: Edge Computing

If we require to manage real-time (with hard and soft deadlines) and non-real-time (or relaxed real-time computation) computation, the hierarchical architecture of cloud-fog-mist-dew computing can be utilized as shown in Fig. 5.9. This is also called Edge Computing architecture. Edge Computing has emerged as an advanced technology for future CPSs and IoTs. It seems to solve the issues of managing delays in hard real-time applications with ease. Along with this, it is going to resolve the issue of excessive bandwidth requirement in core Internet in coming years.

Fig. 5.9
figure 9

CPSs with edge computing and cloud

Edge Computing is the computing in Cloud Servers near to the physical sensing environment [65, 66]. Cloud Servers on Edge are also called Fog Servers or Cloudlets [67,68,69]. They can be just a few hops away from the sensors so decreases the delay dramatically for real-time applications. Even with the lower configuration than a Cloud Server, Fog Server [70, 71] gives better performance by removing the delays of data transmission in Core Internet [72]. This [73] Cloud Hierarchy can be extended further to the Extreme Edge, where computation is done in Mist Servers situated in the vicinity of the sensors just like a private Cloud. There can be many Mist servers available in the boundaries of an organization/institute. Mist servers further manage the delay-sensitive applications better, for example, managing industrial pipeline issues, fire alarms, etc. [74, 75] Computation in Extreme Edge can be done in Sensor Nodes as well [76]. Processors nowadays have the capability to manage some data locally and can do local computations. This is called Dew Computing. There can be local fusion at a sensor on a finer time scale followed by storage locally or fusion over a coarser time scale [77] on stored samples meeting the critical time deadline. Thus, we have a temporal hierarchical fusion of sensed data [78].

A similar idea is applied for opportunistic Communication [79] and control. For this, we can sense all the free channels at any point of time, snatch the band when available and locally transfer to the intermediate node and then to the destination node. This idea can be applied to Edge Computing as well to transmit data over to the Cloud from Fog Server.

4.3 Software System: Temporal Semantics

In the design and analysis of algorithms, various sorting algorithms are thoroughly understood/analysed for time complexity as well as memory complexity [80, 81]. Thus, any application (for instance, sorting marks of students) which uses an efficient sorting algorithm can be predicted for the amount of time taken for generating the output (for worst case input). This conclusion is true for various other algorithm based applications. But there are other software systems (e.g. software switches/routers) for which estimating the time required for getting desired output cannot be easily predicted. Formal computational models of special/general purpose software systems are very useful to determine the time to generate an output given worst case input [81,82,83]. Software testing approaches could also be adopted for estimating the time complexity.

Most software systems are designed to be modular involving “Functions/Subroutines” which can be tested for estimating the time complexity under worst case input. Most Cyber Physical Systems are based on software and/or hardware systems. Thus, temporal semantics must take into account the architecture involving the integration of software and hardware systems.

It should be kept in mind that extensive testing of distributed software/hardware systems may be prohibitive in terms of time required and may not be possible. Thus, new innovative solutions need to be discovered.

5 Reliability and Fault Tolerance: Concurrent Cyber Physical Systems

5.1 Fault Tolerance

The design of [84] Concurrent Cyber Physical Systems evolving on multiple time scales must be fault tolerant and failure tolerant [85]. Such a design is very critical since failures/faults in sub-systems could be very disastrous in various applications [86]. Fault/failure tolerant system design is investigated by various researchers. Such results provide useful insight in the case of Cyber Physical System design. But the highly interconnected network of Cyber Physical Systems presents various new challenges which are not addressed in the traditional fault-tolerant design.

5.2 Fault/Failure Localization:

From a coarse description viewpoint, a graph captures the topology of the interconnected network of Cyber Physical System that potentially spatially distributed and evolving in time on multiple (time) scales.

Diagnostic subsystem embedded into the CPS network must be designed such that fault/failure localization and repair can be done in real-time [87]. In other words, a network of CPSs should be designed for fault/failure tolerance. Well-known approaches such as Design For Testability (DFT), BUILT In Self Test (BIST) in embedded system design provide useful indications/hints.

From a control theoretic viewpoint [88], coupled CPSs involving many feedback loops must be analytically and/or simulation-wise be examined for “stability” issues. In fact, new technologies are required when some of the CPSs are nonlinear. Issues such as positive feedback, resonance must be tested so that small disturbance/noise are not amplified significantly leading to failure of subsystems. The design of the architecture of networked CPS will involve new problems, solutions from a graph/hypergraph theoretic viewpoint.

5.3 Architectural Considerations: Cyber Physical Systems

It is essential that the architecture of any CPS is able to localize fault (fault detection and localization) and be designed in such a way that the entire system is fault tolerant.

In the case of distributed, networked Cyber Physical System there are at least two categories with respect to the topology:

  • Topology of networked CPS is under the control of user: Controlled Deployment

  • Topology of networked CPS is not under the control of user: Uncontrolled Deployment

Example

Consider a wireless sensor network deployed in a building to detect and communicate FIRE in the building. In this case, the user can control the topology/deployment of the wireless network.

Suppose the wireless sensor network is deployed in a forest (using say Helicopter) to monitor and communicate FIRE. The topology/deployment is not under the control of the user. We can also run into distributed networked CPS in which the topology of a portion of the system is under the control of the user and some portion is not under the control of the user. It should be noted that those CPS whose topology is under the control of user are easy to monitor/diagnose and operate.

We are thus naturally led to the design of distributed CPS that are easy to diagnose/monitor and maintain. As in digital telephone networks, the CPS is integrated with an Operations Support System (OSS) for diagnosing/ monitoring/maintaining various subsystems. For such purpose, we propose an overlay network. Such operations support system could be based on modeling abstractions of distributed CPS. The main challenge is that the dynamics of the physical/physiological system could only be partially understood.

In some cases, the dynamics are highly nonlinear and not well understood. One usually resorts to simulations to partially understand the dynamics of such systems. Let us consider the example of Wireless Body Area Network (WBAN). Even though diseases of various organs and their functioning/malfunctioning is understood to a limited extent, well-designed WBAN can monitor the health of various interacting organs in real-time and can provide good diagnostic support to the doctor. The equipment such as ECG machine, MRI scanner can be endowed with software to analyse the 1-D/2-D/3-D signal locally and provide diagnostic help. Also, the equipment could be locally networked to monitor the health of various interacting organs.

In reliability theory applied to fault-tolerant computing systems, various innovative ideas are proposed [89]. Some of those ideas are also applicable to Cyber Physical Systems [90]. Various types of redundancy (e.g. 1-in-N redundant systems) are incorporated to make the entire system sufficiently reliable. By means of test inputs fed to various CPS (Wired Communication or Wireless Communication), it could be possible to monitor the health of various subsystems in a large system. Thus Operations Support System can monitor the health of distributed CPS.

The architecture of wired/wireless sensors could be modified to be able to locally compute fusion functions such as Mean, Median, Mode, etc. on a finer timescale. For instance, underwater sensors can be designed to monitor the earthquake/tsunami. Also, existing sensor designs should be modified in such a way that the architecture is tailored to the MAC, routing protocols utilized to network the sensors.

5.4 Reliability and Fault Management Using Edge Servers

Internet of Things (IoTs) has emerged as a mechanism for connecting physical world and the cyber world via Internet [91]. So while talking about the reliability and fault tolerance in CPS, the whole mechanism can be represented as IoTs alternatively.

5.4.1 Reliability and Backup Policy

One of the important aspects in CPSs is reliability [92]. Reliability refers to the probability of a system working correctly, provided it was working correctly at time t equals zero. That means we are considering the probability over time that the system is working.

To construct a reliable CPS or IoT-Cloud infrastructure the replication of sensed data is very important [93]. The redundancy in data makes sure the feedback for the actuators based on the past sensed data [94, 95]. The backup system can take over the control in case of any failure. For Clouds, we use the concept of AZ (Availability Zone) for backup that can be used in case of any disaster or failure in the Cloud server [96].

Now while using the concept of Edge Computing, the focus is on running CPS Applications from the Edge of the network rather than from the cloud that is so far away from the end sensor devices. So for all the possibilities [97], Fog and Mist level servers should also have backup servers on their levels to run the applications from alternative servers in case of failure of any one of them.

The multi-layered architecture is reliable [98] in the sense that even if there are no alternative servers on the same layer having data replications, there is a guaranty of replication of sensed data on the higher and upper layer. The volume of data for the same sensor may vary on Dew, Mist, Fog and Cloud layers [99] but it would be there on all layers to take over the system in case of absence of any server on any layer.

5.4.2 Fault Tolerance and Agent

By definition, Mobile Agent is a special purpose software code that can transfer itself from one machine to another, but practically it is the same code running on all the machines and just data gets transmitted from one system to another. Mobile Agents are very helpful in managing distributed systems as there is no central system to manage them. In this proposed work, the faults [100, 101] in the whole hierarchy will be managed by Mobile Agents.

Here Agent will work as Resource and Network Monitoring Agent. It will share the neighbour information and link state information with other agents on alternative servers [101], if available. Except monitoring, they will also be responsible for assigning the priority to the CPS applications depending upon their delay-tolerance. This priority information will be used at the time of load distribution [102] of a particular server in case of impacted failure or impacted scheduled shutdown activity [103]. It will also help in new path discovery [104] after the load distribution in the case of faults. It will also keep a check on timing intervals of monitoring and backing up the data.

Figure 5.10 shows the recovery process in case of faults and scheduled shutdowns, reactively and proactively in respective case. It is depicting the complete fault tolerance cycle of the hierarchy between Dew, MIST, Fog and cloud. Here the fault tolerance has been achieved by exploiting the capabilities and benefits of an agent, which is basically a software program running on each server. Also at the time of any fault occurrence, the whole responsibility has been assumed/assigned for upper layer agent, not the affected layer’s agent.

Fig. 5.10
figure 10

Agents’ working in faults

6 Agent Working in Different Conditions

  1. 1.

    As per assumption, the reason behind any fault/shutdown can be either any scheduled activity or any sudden activity.

  2. 2.

    Any sudden or shutdown activity comes with two possibilities that either it’s going to affect respective server/device or no effect at all on server/device.

  3. 3.

    So as per represented in the graph if the ongoing activity is effectless then for scheduled event agent will move with proactive actions which are basically to send notifications to the all respective whereas for sudden activity agent will look for reactive action.

  4. 4.

    For any sudden fault, the agent will fetch priority index for all applications of the affected server and immediately it will check if any other server available on the same layer [104, 105] (either in same or different availability zone). After that it will do application migration [106] and connection redirection and then will do the load transfer activity as per the sequence given below:

  • Total load = C

  • Server S can handle (load) = T

  • if T > 0,

  • then

    • Transfer T (load) → S

    • Transfer (CT) load → upper layer

  • else if T = 0

    • Transfer whole load → upper layer

  1. 5.

    But unfortunately, if no other same layer server is available, then it will point for the upper layer to transfer the whole load.

7 Conclusion

This book chapter is all about providing appropriate models and solutions for Concurrent Cyber Physical Systems. The chapter takes into consideration the concurrency and the synchronization requirement of the systems. Tensor State Space Representation (TSSR) is used to model linear concurrent Cyber Physical System. The model works for both homogeneous and heterogeneous type of systems. The chapter also defined the idea of delay buffers for synchronizing multiple sub-systems and model for clock synchronization of multidimensional Cyber Physical Systems. Importance of Time or Temporal semantics can’t be denied in concurrent systems. Importance of time in real-time Cyber Physical Systems is discussed and a time-oriented solution “Temporal Division of Labour” for data fusion on multiple levels of systems is represented. At last, one advanced technology Edge Computing was discussed as a solution to multiple issues. It has been shown that how the hierarchical Cloud can manage temporal data and how it can also deal with reliability, fault tolerance and fault localization issues. All the formal discussions regarding CPSs are very important to have a theoretical understanding of issues and their solutions.