*3.2.1 Overall structure of the proposed railway vehicle agent-based control system*

The proposed system receive the sensory and balise information velocity, position and mileage records actual distance covered for error correction through the fuzzy PI-D for precision in speed adjustment as shown in **Figure 5** basic block diagram of the system. The characteristics of the control performance of this proposed approach, as it improves the maintenance actions and train arrival times can be oriented towards two major aspects:


The feed-forward part use the *actual value Xs*(*k*) of the set point explicitly to estimate the nonlinear characteristic in the steady state for the fuzzy model. The feedback make use of classical fuzzy controller. The control law calculates what the input to the railway vehicle should be in the *s* domain, based on the difference between the desired and actual outputs measured error and the desired performance goals.

For resource planning control performance, the various links in internal subblocks are completely autonomous based on agent-based approach for communication and coordination. The root chart information is the incoming and outgoing information records. The various conditions monitoring units called agents because

#### **Figure 5.**

*Basic block diagram of overall structure of the proposed railway vehicle agent-based control system.*

*Agent-Based Control System as a Tool towards Industry 4.0: Directed Communication Graph… DOI: http://dx.doi.org/10.5772/intechopen.87180*

these units get the information from their own resources and control the system autonomously according to their control designs. These agents also transmit their information to some parts of the overall communication system. Therefore, the railway vehicle system is controlled and managed through their participation. The directed communication can be accomplished through a direct information exchange between agents is based on the agent communication language (ACL) and utilised for the inter-agent communications in the same layer. The indirect communication mode (LAN, wireless, GPS/GPRS, Bluetooth, etc.) is used for enabling the information exchange between agents in different layers.

## **3.3 Mathematical modelling of the Laplacian matrix for the directed communication graph system**

The results of the directed communication graph from Laplacian perspective prompted the adoption of the theory for the information consensus network. Considering a network of agents in **Figure 1** with dynamics *x*\_ <sup>1</sup> ¼ *ui*, in reaching a consensus through local communication with the neighboring controller agent on a graph *G* ¼ ð*V,E*), the asymptotically converging to a one-dimensional space agreement can be characterize by the following equation:

$$
\dot{\mathbf{x}}\_1^\cdot = \boldsymbol{\mu}\_i \tag{22}
$$

The space agreement can be express as *<sup>x</sup>* <sup>¼</sup> *<sup>α</sup>***<sup>1</sup>** where **<sup>1</sup>** <sup>¼</sup> ð Þ <sup>1</sup>*;* …*;* <sup>1</sup> *<sup>T</sup>* and *<sup>α</sup>* <sup>∈</sup>*<sup>R</sup>* is the collective decision of the group of controller agents. Let *A* ¼ ½ � *aij* be the adjacency matrix of directed communication graph for *G*. The set of neighbours of an agent *i* is *Ni* and defined by:

$$\text{Ni} = \{ j \in V : a \ddot{y} \neq \mathbf{0} \}; V = \{ \mathbf{1}, \dots, n \} \tag{23}$$

The railway vehicle agent *i* communicates with the train controller agent *j* if *j* is a neighbour of *i or aij* ð Þ 6¼ 0 *,* the set of all nodes and their neighbor's defines the edge set of the graph as:

$$E = \{(i, j) \in V \times V : aij \neq \mathbf{0}\}\tag{24}$$

A dynamic directed communication graph [47] *G t*ðÞ¼ ð Þ *V; E t*ð Þ is a graph in which the set of edges *E t*ð Þ and the adjacency matrix *A t*ð Þ are time varying. Clearly, the set of neighbours *Ni* of every agent in a dynamic directed communication graph for the Vehicle Actuator Agent is a time-varying [40] set shown as the linear system;

$$\dot{\boldsymbol{\varkappa}}\_1(t) = \sum\_{j \in N\_i} \left( \boldsymbol{a}\_{\dot{\boldsymbol{\eta}}} (\boldsymbol{\varkappa}\_j(t) - \boldsymbol{\varkappa}\_i(t)) \right) \tag{25}$$

A distributed consensus algorithm guarantees convergence to a collective decision via local inter-agent interactions. Assuming that the graph is undirected, ð Þ *aij* ¼ *aji for all i; j :*it follows that the sum of the state of all nodes is an invariant quantity, or P *<sup>i</sup> x*\_ ð Þ ð Þ <sup>1</sup> ¼ ð Þ 0 *:* In particular, applying this condition twice at times *t* ¼ 0 and *t* ¼ ∞ gives the following result:

$$\infty = \frac{1}{n} \sum\_{i} \left( (\mathbf{x}\_i(\mathbf{0})) \right) \tag{26}$$

*C s*ð Þ *R s*ð Þ

*nn*<sup>2</sup> *g* ð Þ <sup>1</sup>�*<sup>y</sup>* <sup>2</sup> *Jm* <sup>þ</sup> <sup>1</sup> ð Þ <sup>1</sup>þ*<sup>y</sup>* <sup>2</sup> *r*2 0 *Jw* <sup>þ</sup> *Mstc* <sup>∗</sup> <sup>1</sup>

*Control Theory in Engineering*

<sup>1</sup> <sup>þ</sup> *nn*<sup>2</sup> *g* ð Þ <sup>1</sup>�*<sup>y</sup>* <sup>2</sup> *Jm* <sup>þ</sup> <sup>1</sup> ð Þ <sup>1</sup>þ*<sup>y</sup>* <sup>2</sup> *r*2 0 *Jw* <sup>þ</sup> *Mstc* <sup>∗</sup> <sup>1</sup>

mance goals.

**Figure 5.**

**236**

<sup>2</sup> *<sup>ρ</sup>airCdAvV*<sup>2</sup> <sup>¼</sup> <sup>∗</sup> *nn*<sup>2</sup>

be oriented towards two major aspects:

<sup>2</sup> *<sup>ρ</sup>airCdAvV*<sup>2</sup> <sup>¼</sup> <sup>∗</sup> *nn*<sup>2</sup>

*g* ð Þ <sup>1</sup>�*<sup>y</sup>* <sup>2</sup> *Jm* <sup>þ</sup> <sup>1</sup> ð Þ <sup>1</sup>þ*<sup>y</sup>* <sup>2</sup> *r*2 0

to hold the set point as soon as an error is noticed.

un-damped oscillations of the train movement.

*g* ð Þ <sup>1</sup>�*<sup>y</sup>* <sup>2</sup> *Jm* <sup>þ</sup> <sup>1</sup> ð Þ <sup>1</sup>þ*<sup>y</sup>* <sup>2</sup> *r*2 0

*3.2.1 Overall structure of the proposed railway vehicle agent-based control system*

The proposed system receive the sensory and balise information velocity, position and mileage records actual distance covered for error correction through the fuzzy PI-D for precision in speed adjustment as shown in **Figure 5** basic block diagram of the system. The characteristics of the control performance of this proposed approach, as it improves the maintenance actions and train arrival times can

1. The *process output C*(*s*) is forced by the controller to match the predefined *set point R*(*s*) by adjusting the *process input U*(*k*) to the value needed in steady state

2. The *process output C*(*s*) guaranteed by the controller to follow the *set point Xs*(*k*) by varying the *process input R*(*s*) in a way to minimize effectively the *offset* between *X*(*t*) and *Xs*(*k*) as good as it can make the damping of the naturally

The feed-forward part use the *actual value Xs*(*k*) of the set point explicitly to estimate the nonlinear characteristic in the steady state for the fuzzy model. The feedback make use of classical fuzzy controller. The control law calculates what the input to the railway vehicle should be in the *s* domain, based on the difference between the desired and actual outputs measured error and the desired perfor-

For resource planning control performance, the various links in internal subblocks are completely autonomous based on agent-based approach for communication and coordination. The root chart information is the incoming and outgoing information records. The various conditions monitoring units called agents because

*Basic block diagram of overall structure of the proposed railway vehicle agent-based control system.*

*Jw* þ *Mstc*g *a* tan *Qg* 

*Jw* þ *Mstc*g *a* tan *Qg* 

<sup>∗</sup> *Kp* <sup>1</sup> <sup>þ</sup> <sup>1</sup> *Tis x*\_ 1 *x*\_ 2 

> <sup>∗</sup>*Kp* <sup>1</sup> <sup>þ</sup> <sup>1</sup> *Tis x*\_ 1 *x*\_ 2

<sup>¼</sup> <sup>0</sup> *<sup>Z</sup>*<sup>1</sup> 1 �*Z*<sup>2</sup> *x*<sup>1</sup> *x*2 <sup>þ</sup> <sup>0</sup> *Z*3 *U*

<sup>¼</sup> <sup>0</sup> *<sup>Z</sup>*<sup>1</sup> 1 �*Z*<sup>2</sup> *x*<sup>1</sup> *x*2 <sup>þ</sup> <sup>0</sup> *Z*3 *U*

(21)

An *average-consensus algorithm* [40] can be reach asymptotically through the collective decision of the average of the initial state of all nodes. It has broad applications sensor fusion in sensor networks for distributed computing on networks and dynamics of system [48], which can be express in a compact form as

$$
\dot{x\_1} = -L\mathfrak{x} \tag{27}
$$

Denote the m clusters as

*DOI: http://dx.doi.org/10.5772/intechopen.87180*

8 >>><

>>>:

*L* ¼

*C*<sup>1</sup> ¼ f g 1*;* 2*;* …*;r*1 *, C*<sup>2</sup> ¼ f g *r*<sup>1</sup> þ 1*;r*<sup>1</sup> þ 2*;* …*;r*2 *,* ⋮ *Cm* ¼ f g *rm*�<sup>1</sup> þ 1*;rm*�<sup>1</sup> þ 2*;* …*; n ,*

*Agent-Based Control System as a Tool towards Industry 4.0: Directed Communication Graph…*

where, 1≤*r*<sup>1</sup> <*r*<sup>2</sup> < … < *rm*�<sup>1</sup> <*n* represented by the matrix form block as: The modelling of the Laplacian matrix for the directed communication graph

> 1 0 0 00 �1 �1 3 �10 0 �1 002 �1 0 �1 0 0 �1 2 �1 0 �100 0 1 0 �1 �1 0 �10 3

where, *Lij* ð Þ 1≤ *i; j*≤ *m* specifies the coupling from cluster *Cj to Ci*, in order to

This means that for nodes within the same cluster, the sums of the incoming weights from the other clusters are the same. A simple case is that the constant is 0 for any *k* and *l*, which is also termed the 'in-degree balanced' condition. This indegree balanced condition shows that the inter-cluster coupling weighted in either positive or negative and both signs are indeed required. To guarantee cluster consensus, it is usually assume that different clusters of nodes have different selfdynamics *fi t*ð Þ *; xi* and that there is a leader for each cluster of nodes. Such leaders have no coincidence with each other [29, 32] or nodes in the same cluster have the

In this section, we present the simulation results of the experiment for agent communication information networked systems for consensus algorithm with dynamic topology. The directed information flow is demonstrated with speed of convergence for n = 6 nodes (number of agents) in **Figure 6**. The network has 20 links with *δ* = 6 neighbours and initial state is set to xi (0) = i for i = 1... 6 with a network topology reaching an average-consensus more than the other according to [49]. For individual agents to interact, cooperate, communicate, exchange information and understand each other's, the semantics of the messages, logics and structure of the network links (browsers of the web) are the clients between the agents with Internet Protocols (IP) addresses as all the nodes. The connectors, which is HTTP Protocol, facilitate the distributed resources database between the internet protocol, which route the packets between the nodes, servers and two-way point protocol to facilitate distributed transactions. The authors modelled the Laplacian matrix for the system to route the Application Programmable Interface

system in Eq. (34) written as block matrix form in the following:

make the cluster consensus problem solvable, it is often assume that

8

>>>>>>>><

>>>>>>>>:

X *j*∈*C*<sup>1</sup>

*3.3.1 Simulation results of agent-based control system models*

same self-dynamics [27, 30].

**239**

9 >>>=

>>>;

9

>>>>>>>>=

>>>>>>>>;

ð Þ *aij* ¼ *constant;* ∀*<sup>i</sup>* ∈*Ck; k* 6¼ *l* (35)

(33)

(34)

L is the directed communication graph Laplacian of G and defined as

$$L = D - A \tag{28}$$

where *D* ¼ diagð Þ *d*1*;* …*; dn* is the degree matrix of directed communication graph G with elements *di* <sup>¼</sup> <sup>P</sup> *j*6¼*i aijPj*6 ¼ *i aij* and zero off-diagonal elements.

For directed communication Laplacian, L with a right eigenvector of 1 is associated with the zero eigenvalue L1 = 0 due to the identity.

For undirected communication graphs, the Laplacian graph satisfies the following sum-of-squares (SOS) property:

$$\propto ^T L \mathfrak{x} = \frac{1}{n} \sum\_{\vec{\eta} \in E} \left( a\_{\vec{\eta}} \left( \mathbf{x}\_{\vec{\eta},...} \mathbf{x}\_{i} \right)^2 \right) \tag{29}$$

The quadratic disagreement function can be define as

$$\boldsymbol{\rho}(\mathbf{x}) = \frac{1}{2}\boldsymbol{\pi}^T \boldsymbol{L} \boldsymbol{x} \tag{30}$$

It becomes apparent that the algorithm is the same as;

$$\mathfrak{x} = -\nabla \mathfrak{q}(\mathfrak{x})\tag{31}$$

This algorithm can converge asymptotically based on the space agreement provided the two conditions hold:

### 1. Directed communication graph Laplacian L is a positive semi definite matrix and;

2. Directed communication graph equilibrium is *α***1** for some *α*.

Both of these conditions hold for a connected directed communication graph and follow from the SOS property of Laplacian L in **Figure 1**. Therefore, an averageconsensus is reach asymptotically for all initial states.

The cluster consensus problem is often consider in the following extensively studied model that consists of n couple of agents in m clusters:

$$\dot{\mathbf{x}}\_{i} = f\mathbf{\dot{r}}(t, \mathbf{x}i) + c\Gamma \sum\_{j=1, j\neq 1}^{n} a\ddot{\mathbf{y}}\left(\mathbf{x}\_{j} - \mathbf{x}\_{i}\right) \tag{32}$$

where *xi*∈*R<sup>p</sup>*denotes the state of the controller agent *i i*ð Þ <sup>¼</sup> <sup>1</sup>*;* <sup>2</sup>*;* …*; <sup>n</sup> , fi* : *<sup>R</sup>* þ �*R<sup>p</sup>* ! *<sup>R</sup><sup>p</sup>*is continuous and globally Lipschitz, *<sup>c</sup>*<sup>&</sup>gt; 0 is the coupling strength, *Γ* ¼ diagð Þ *γ*1*; γ*2*;* …*; γn* with *γk*≥0 ð*k* ¼ 1 1ð Þ *;* 2*;* …*; n* ) is a diagonal matrix denoting the inner coupling, and *aij* is the coupling coefficient from agent *j* to agent *i* for*j* 6¼ 1.

*Agent-Based Control System as a Tool towards Industry 4.0: Directed Communication Graph… DOI: http://dx.doi.org/10.5772/intechopen.87180*

Denote the m clusters as

An *average-consensus algorithm* [40] can be reach asymptotically through the collective decision of the average of the initial state of all nodes. It has broad applications sensor fusion in sensor networks for distributed computing on networks and dynamics of system [48], which can be express in a compact form as

<sup>1</sup> ¼ �*Lx* (27)

*L* ¼ *D* � *A* (28)

*xTLx* (30)

*x* ¼ �∇*φ*ð Þ *x* (31)

(29)

*x*\_

L is the directed communication graph Laplacian of G and defined as

G with elements *di* <sup>¼</sup> <sup>P</sup>

*Control Theory in Engineering*

ing sum-of-squares (SOS) property:

vided the two conditions hold:

matrix and;

*i* for*j* 6¼ 1.

**238**

*j*6¼*i*

ated with the zero eigenvalue L1 = 0 due to the identity.

*xTLx* <sup>¼</sup> <sup>1</sup> *n* X *ij*∈*E*

*φ*ð Þ¼ *x*

1. Directed communication graph Laplacian L is a positive semi definite

2. Directed communication graph equilibrium is *α***1** for some *α*.

consensus is reach asymptotically for all initial states.

studied model that consists of n couple of agents in m clusters:

*<sup>x</sup>*\_*<sup>i</sup>* <sup>¼</sup> *fi t*ð Þþ *; xi <sup>c</sup><sup>Γ</sup>* <sup>X</sup>*<sup>n</sup>*

where *xi*∈*R<sup>p</sup>*denotes the state of the controller agent *i i*ð Þ <sup>¼</sup> <sup>1</sup>*;* <sup>2</sup>*;* …*; <sup>n</sup> , fi* : *<sup>R</sup>* þ �*R<sup>p</sup>* ! *<sup>R</sup><sup>p</sup>*is continuous and globally Lipschitz, *<sup>c</sup>*<sup>&</sup>gt; 0 is the coupling strength, *Γ* ¼ diagð Þ *γ*1*; γ*2*;* …*; γn* with *γk*≥0 ð*k* ¼ 1 1ð Þ *;* 2*;* …*; n* ) is a diagonal matrix denoting the inner coupling, and *aij* is the coupling coefficient from agent *j* to agent

The quadratic disagreement function can be define as

It becomes apparent that the algorithm is the same as;

where *D* ¼ diagð Þ *d*1*;* …*; dn* is the degree matrix of directed communication graph

For directed communication Laplacian, L with a right eigenvector of 1 is associ-

For undirected communication graphs, the Laplacian graph satisfies the follow-

1 2

This algorithm can converge asymptotically based on the space agreement pro-

Both of these conditions hold for a connected directed communication graph and follow from the SOS property of Laplacian L in **Figure 1**. Therefore, an average-

The cluster consensus problem is often consider in the following extensively

*<sup>j</sup>*¼<sup>1</sup>*,j*6¼<sup>1</sup>

*aij xj* � *xi*

� � (32)

*aijPj*6 ¼ *i aij* and zero off-diagonal elements.

*aij xij,*…*, xi* � �<sup>2</sup> � �

$$\left\{ \begin{array}{c} \text{C}\_{1} = \{1, 2, \ldots, r1\}, \\ \text{C}\_{2} = \{r\_{1} + 1, r\_{1} + 2, \ldots, r2\}, \\ \vdots \\ \text{C}m = \{r\_{m-1} + 1, r\_{m-1} + 2, \ldots, n\}, \end{array} \right\} \tag{33}$$

where, 1≤*r*<sup>1</sup> <*r*<sup>2</sup> < … < *rm*�<sup>1</sup> <*n* represented by the matrix form block as:

The modelling of the Laplacian matrix for the directed communication graph system in Eq. (34) written as block matrix form in the following:

$$L = \begin{Bmatrix} 1 & 0 & 0 & 0 & 0 & -1 \\ -1 & 3 & -1 & 0 & 0 & -1 \\ 0 & 0 & 2 & -1 & 0 & -1 \\ 0 & 0 & -1 & 2 & -1 & 0 \\ -1 & 0 & 0 & 0 & 1 & 0 \\ -1 & -1 & 0 & -1 & 0 & 3 \end{Bmatrix} \tag{34}$$

where, *Lij* ð Þ 1≤ *i; j*≤ *m* specifies the coupling from cluster *Cj to Ci*, in order to make the cluster consensus problem solvable, it is often assume that

$$\sum\_{i \in C\_1} (a \text{ij} = constant, \forall i \in C\_k, k \neq l) \tag{35}$$

This means that for nodes within the same cluster, the sums of the incoming weights from the other clusters are the same. A simple case is that the constant is 0 for any *k* and *l*, which is also termed the 'in-degree balanced' condition. This indegree balanced condition shows that the inter-cluster coupling weighted in either positive or negative and both signs are indeed required. To guarantee cluster consensus, it is usually assume that different clusters of nodes have different selfdynamics *fi t*ð Þ *; xi* and that there is a leader for each cluster of nodes. Such leaders have no coincidence with each other [29, 32] or nodes in the same cluster have the same self-dynamics [27, 30].

#### *3.3.1 Simulation results of agent-based control system models*

In this section, we present the simulation results of the experiment for agent communication information networked systems for consensus algorithm with dynamic topology. The directed information flow is demonstrated with speed of convergence for n = 6 nodes (number of agents) in **Figure 6**. The network has 20 links with *δ* = 6 neighbours and initial state is set to xi (0) = i for i = 1... 6 with a network topology reaching an average-consensus more than the other according to [49]. For individual agents to interact, cooperate, communicate, exchange information and understand each other's, the semantics of the messages, logics and structure of the network links (browsers of the web) are the clients between the agents with Internet Protocols (IP) addresses as all the nodes. The connectors, which is HTTP Protocol, facilitate the distributed resources database between the internet protocol, which route the packets between the nodes, servers and two-way point protocol to facilitate distributed transactions. The authors modelled the Laplacian matrix for the system to route the Application Programmable Interface

in rail manufacturing enterprise resource planning and supply chain managements for consolidating plans in Industry 4.0. The results of this study showed the combination of multi-agent system with ability to interact effectively to make informed decision on the type of maintenance actions, on resource planning, scheduling and management of the train arrival times, speed control adjustment, mileage, etc. The possible implementation platform for individual agents to interact, cooperate, communicate, exchange information and understand each other's with the semantics of the messages, logics and structure of the network links (browsers) of the web are the clients between the agents with Internet Protocols (IP) addresses as all the

*Agent-Based Control System as a Tool towards Industry 4.0: Directed Communication Graph…*

\*, Mpofu Khumbulani<sup>1</sup> and Adenuga Olugbenga Akeem<sup>2</sup>

1 Department of Industrial Engineering, Tshwane University of Technology,

2 Graduate School of Business Leadership, University of South Africa Midrand,

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium,

\*Address all correspondence to: olukorede.adenuga@gmail.com

nodes will be addressed in future work.

*DOI: http://dx.doi.org/10.5772/intechopen.87180*

**Author details**

Adenuga Olukorede Tijani1

provided the original work is properly cited.

Pretoria, South Africa

South Africa

**241**

**Figure 6.**

*Laplacian matrix for the directed communication graph system with 20 links and communication node of* δ *= 6 neighbours.*

(API) of the agents using authentication criteria App\_ID and APP\_Code to determine Agents starts point (Starts 0 to Start N) and Agents destination (Destination 0 to Destination M) way points. This helps to determine the fastest routes between one agent and another agent.

The matrix routing is done with React Js (Real Time Communication for IoT to store data in JSON) with Firebase to optimize the agent communication using few libraries for making HTTP (Hyper Text Transfer Protocol) requests for easy application to access and store data seamlessly. The data encapsulate the view and behaviour of the user interface. The FTP (File Transfer protocol) is used to communicate between the device with a bit complex software for a simple application using Android Studio for running the emulator, NodeJs (open-source, crossplatform JavaScript run-time environment) was used for running the server with the hardware platform for Arduino IDE (integrated development environment). Google firebase is use as NoSQL, an intermediate communication medium between for IoT devices using the powerful real-time database and application programmable interface (API).
