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

Agent-based control systems composed of simple locally interacting controller agents with demonstrated complex group behaviour. There have been relatively few implementations of agent-based control systems, mainly because of the difficulty of determining whether simple controller agent strategies will lead to desirable collective behaviour in a large system. The aim of this chapter is to design an agent-based control system for sets of ‘ clustered ’ controller agents through proposed directed communication graph approach as potent tool for the Industry 4.0. To reach global coordination with focus on real world applications, we use cluster algorithm technique in a set of rules for assigning decision tasks to agents. The outcomes include behavioural pattern, trend of agents and multi-agents usage in rail manufacturing enterprise resource planning and supply chain management. The results of this study showed that the combination of multi-agent system has ability to interact effectively and make informed decision on the type of maintenance actions, resource planning, train arrival times, etc.


Introduction
An agent is define as a concept in the field of artificial intelligence with flexible autonomous actions including responsiveness, autonomy, pro-activeness, adaptability, mobility, veracity, situatedness, reasoning, social behaviour and learning [1][2][3]. An agent could be a mechanical system, a person, a smart dog, and a piece of software with an embedded control algorithm used as an intelligent controller. Agent's applications in heterogeneous distributed database [4]; or mobile software entity can act and make decision on behalf of a human [5].
Agent-based approach has created a platform to analyse, design, and implement complex (software) systems [6], with design methodologies namely problemoriented, architecture-oriented and process-oriented [7]. The two promising approaches to problem-oriented agent-based design are the Gaia approach [8] and configuring an agent-based simulation to run in a container of a high-performance remote machine or in the cloud can execute several behaviours concurrently in agents. The communication model consists of asynchronous message passing through an actor to answer an incoming message as a reactive entity based on its current state. The actor will be at rest until a message arrives, while message processing is atomic and triggers a data/state transition. Agents in a network can reach more than one consistent state in a topology of a distributed system represented by a graph, while nodes represent processes and the links represent communication channels [24]. Agents in the same cluster can reach a consensus (cluster consensus), that has recently been having increasing attention by different researchers [25][26][27][28][29][30][31][32]. The cluster consensus problem is often considered in the following extensively studied model in engineering control [33], and distributed computation with two, three coupled agents in four clusters [34], graph theory [35] and several new notions [36,37]. Since 2003, agent-based systems approach have become an active research topic in systems and control, where a multi-agent system is usually considered to be a collection of autonomous or semi-autonomous, but interacting and dynamic systems [38]. A generalised Laplacian associated with a directed communication graph with weights may be matrices, time-varying variables, or dynamic systems. The linear consensus law [39,40] and consensus control schemes can be modified by including displacement vectors to solve the formation control problem [41][42][43].
Agent-based control system is the use of software for complex actions, composed of simple locally interacting controller agents with demonstrated complex group behaviour in terms of configuration, reconfigurable systems manufacturing enterprise, production process planning and scheduling, shop floor control, interacting and dynamic systems [38]. The success of the agent-based control system will necessitates the synthesis of ideas and the processes revision that ought to be model and designed for an agent's collaboration and communication. The method of integration of agent into control system is of significance in facilitating the conception and visualisation of the needs to perform the iteration. The process approaches the real-time scenario with optimal ideal iteration by representing the agent mode of collaboration and communication as the ultimate goal for prototyping and iterative development. Notwithstanding, the immense model and iteration needed to integrate agent-based approach suitably into control system. In this chapter, the definition of an agent is inclined to the context of control systems with functional decentralised architecture. It takes in data from sensor as well as data from other agents; it provides data to its neighbouring agents as well as commands to actuators. Internally, a decision-making module processes information and incoming messages, and issues messages to the rest of the system. Each agent has a clear interface boundary of interaction with other agents such as what inputs it needs, and what outputs it offers. Each agent has its own logic to decide the behaviours of itself according to its environment, which is determine by its inputs. Each agent affects the other agents' behaviour by its outputs. Note that inputs are not necessarily from the sensors and the outputs are not necessary to the actuators. There have been relatively few implementations of agent-based control systems, mainly because of the difficulty in determining whether simple controller agent strategies will lead to desirable collective behaviour in a large system.
In consolidating on the plans for platform in Industry 4.0, which requires openness with generated data and collaboration of actions enable by new processes, product and services. The German government in 2012 with cooperation of industrial and scientific organisation came up with the initiative as a phenomenon based on smart factories, self-organisation, and cyber-physical systems (CPS), the Internet of Things (IOT), energy efficiency services, and cloud computing. In the development of products and services adaption to human needs and corporate social responsibility, the promotion of the Industry 4.0 revolution proliferate in the three tier of industries namely: primary, secondary and tertiary with the horizontal expansion of information technology, creative connection between the market and acquisition of a leadership position in manufacturing sector in the world [44]. At the same time, USA developed the 'Advanced Manufacturing Partnership', a reindustrialization plan aimed at innovating manufacturing through the adoption of intelligent production systems and improving the occupational levels of the country in order to increase productivity and reduce costs. The idea include key dimensions in the technology landscape, which includes big data, connectivity, automation, machine learning, application of intelligent agents, artificial intelligence, use of sensors, block chains, virtual reality, augmented reality and 3D printing. In 2015, France launched the 'Alliance for the Future program' to implement the digitization process for support innovation, while in 2016 Italy approved the Industry 4.0 revolution plan [45]. The short supplies in the requisite human skills and technological capabilities with the unknown in product and processes of the next generation of equipment with embedded custom designed software for responsive and interactive tracking of own activities along with other product activity around them are the subject of the chapter.
This section introduces a review of the general concepts of agent's, agent-based systems and integration into control systems. The rest of the chapter is organized as follows. In Section 2, design and application was treated with some concepts in graph theory, and Section 3 mathematical modelling and transfer function of agentbased control system where the problem to be investigated is formulated with theoretical results for consensus were derived. Section 4 is the conclusion.
2. Design and application of agent-based control system to all sets of 'clustered' controller agents The design of agent-based control systems involves the cooperation of agents in multi-agent systems (MASs), which is dependent on effective communication and sharing information to reach a global coordination. This design required a sensing information from local sensors, or collected data by some agent or subset of nearby agents with a set of rules for assigning decision tasks. The communicated information is a point-to-point message with assumed limited bandwidth routed in more modularised design send information that is more complex. The control models for agent interaction protocol as presented in Figure 1 use directed communication graph (DCG), which displays the topographical features as a form of information feedback loops for the flow of information (sensed or communicated). It is to strongly connect a directed path between any two agents and weakly connect an undirected path between any two agents if exists. The dynamics of the agents is the encoding of intra-agent internal state associated with the definition of the functionality and behavioural aspects of the relationship to current task.
The agent-based system conceptualisation brings about a great deal of deep and vast thought. The success of the agent-based control system necessitates the synthesis of ideas and the processes revision that ought to be model for agent's collaboration and communication. The method for integration of agents into a control system is of significance in facilitating the conception and visualisation of the needs to perform the iteration.

Mathematical modelling and transfer function of agent-based control system for sets of 'clustered' controller agents
This section explores the techniques around the modelling and detailed design for the agent-based control system development. The mathematical theory involve multiple modelling techniques, while the decomposition of the control system is the shows the dynamic behaviour of all these modelling techniques. The idea synthesis and process model for an agent's collaboration and communication concepts was adopted from other scholars in the field of control. The development of an open architecture (OA) based intelligent fuzzy-PID; require the processing of the input signal variables (balise signal) going through the fuzzification with linguistic membership generation does not require a precise mathematical representation of the process. The train controller agent provides robust control and stability for the brake traction via rail controller agent within a range of operating parameter changes.
The closed-loop transfer function can be derived as shown in Figure 2, as a function of the fuzzy-PID controller gains as follows: Solving Eq. (2) for C(s), we get; Note that Eq. (4) gives the response C(s) when both reference input R(s) and disturbance input D(s) are present.
To find transfer function C(s)/R(s), we let D(s) = 0 in Eq. (4). Then we obtain Similarly, to obtain transfer function C(s)/D(s), we let R(s) = 0 in Eq. (1). Then C(s)/D(s) given by

Fuzzy-PI-D controller as subset of train controller agent
The maximum input of three-input fuzzy controller (Z1-feedforward, Z2feedback and Z3-setpoint) and two-output, which is the correction factor of PID controller (max overshoot M p and adjustment time, T s ), adopted from the work of [46] is as follows: The physical domain setting for M p and T s is expected to generate the PID control system parameter set as K p = 1, K i = K d = 0, the dynamic performance indexes are [ÀM p , + M p ], [0, Ts]. The linguistic terms are categorised into nine, which relates to error in speed of the train: small 1 (smal1), small 2 (smal2), small 3 (smal3), large 1 (lar1), large 2 (lar2), large 3 (lar3), zero (ze), positive 1 (pos1), and positive 2 (pos2) as presented in Figure 3. Similarly, the error is the change of the speed (Δe) and is presented as the fuzzy set {positive small (posmall), positive medium (posmed), zero (ze), positive (pos) and positive big (posbig)} over the interval from À10 to 10 V. Finally, the output signal is the fuzzy set {zero, positive small, positive medium, positive, positive big} over the interval of 0-24 V. The fuzzy controller has the knowledge base for a rule base and membership functions with linguistic terms in a triangular-shape. The derivation of the mathematical control equation extracted from the work of [46]; known as a method used in deriving a fuzzy model for a nonlinear system. There is an impossible nonlinear equation of motion enables by parallel distributed control, the derivation of the controller may assume a scalar nonlinear functions Z(x), modelled in the domain X, where b m = min (z) and b M = max (z). Then, two fuzzy sets P 1 and P 2 created as X x triangular membership functions characterize by U 1 (z) and U 2 (z), then the fuzzy language for control rules will be represented as: where Z represented exactly on the X-axis as Z ¼ U 1 z ð Þbm þ U 2 z ð ÞbM This model a nonlinear dynamic system used as a weighted average of linear systems, with the mathematical models: _ This system can be verify as an open-loop unstable (reference), defined as: In deriving a Takagi-Sugeno fuzzy system, it is assume that the bounded domain X is define by x 1 ∈ À10; 10 ½ and x 2 ∈ À10; 10 ½ where x 1 and x 2 is the T-S fuzzy system behaviour as exact duplicates in the equation in the domain. Then, the min Then the above Eqs. (12) and (13) rewritten as:

Simulation results for fuzzy-PI-D controller
This section presents a simulation example to show an application of the proposed fuzzy-PI-D controller spreadsheet rules for the membership fuzzy and simulation structure containing Input interfaces; rule block and output interface and its satisfactory performance (Figure 4).

Modelling and adaptive process control for train controller agent
interfacing with rail vehicle actuator agent  The resultant equation for Train controller agent is the dynamic mass regarded as G2.
n g is the gear ratio, n is the gear efficiency, r 0 is the nominal rolling radius of the wheel, J m is the total motor Kgm 2 À Á implies as J m ¼ 1 2 M r r r ð Þ 2 l, M r is the motor mass, r r is the radius of rotor shaft, l is the total of the traction system set, J w is the total sum of the right and left wheel inertia and implies as J w ¼ M w r 2 0 nm M pass is the passenger mass, M w is the mass of the single wheel, M x is the axle mass, M br is the mass of the brake system, M b1 , M b2 , M b3 are bogie masses, M motor is the total mass of the traction motor. M g is denoted the gearbox mass.
Rolling resistance created by the movement of rotating parts of the train, originated from the frictional torques such as rotor, bearing torques, axles, brake pads, gear teeth friction, etc. The mathematical expression of the rolling resistance shown in Eq. (18).
where K 0 ¼ M stc a Rolling þ n:m:b Rolling K 1 ¼ M stc , C Rolling , a Rolling , b Rolling , C Rolling are running parameters, respectively. The movement of the railway vehicle takes place against the airflow, and the force that the air applies to the train affects the longitudinal movement of the train. The aerodynamic force is due to the common effects of the pressure difference between the front and the rear of the train. Air separation results in vortex formation behind the vehicle and the surface roughness of the vehicle body related with the skin friction. The parametric relationship of the aerodynamic resistance force shown in the Eq. (19).
where, ρ air is the air density (kg m 3 ), C d is an aerodynamic drag coefficient, Av is the frontal section of the train. These parameters represent a single parameter known as K 2 . A gradient force acts on the opposite direction to the movement of the train moving upwards on a road with slope. The gradient force is constant under the constant slope condition. Eq. (20) represents the mathematical form of the gradient force.
g is the gravitational constant, Q g is the gradient.
as Train controller Agent equation is thus 9 Agent-Based Control System as a Tool towards Industry 4.0: Directed Communication Graph… DOI: http://dx.doi.org/10.5772/intechopen.87180 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: 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 to hold the set point as soon as an error is noticed.
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 un-damped oscillations of the train movement.
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. 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.

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 1 ¼ u i , 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: The space agreement can be express as x ¼ α1 where 1 ¼ 1; …; 1 ð Þ T and α ∈ R 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: 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: A dynamic directed communication graph [47] Þ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; 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 i _ Þ : In particular, applying this condition twice at times t ¼ 0 and t ¼ ∞ gives the following result: 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 _ x 1 ¼ ÀLx (27) L is the directed communication graph Laplacian of G and defined as where D ¼ diag d1; …; dn ð Þis the degree matrix of directed communication graph G with elements di ¼ P j6 ¼i aijPj6 ¼ 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: The quadratic disagreement function can be define as It becomes apparent that the algorithm is the same as; 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: where xi ∈ R p denotes the state of the controller agent i i ¼ 1; 2; …; n ð Þ , fi : R þ ÂR p ! R p is continuous and globally Lipschitz, c > 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 forj 6 ¼ 1.
Denote the m clusters as where, 1 ≤ r 1 < r 2 < … < r mÀ1 < 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: where, Lij 1 ≤ i; j ≤ m ð Þspecifies the coupling from cluster C j to C i , in order to make the cluster consensus problem solvable, it is often assume that X 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].

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 (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).

Conclusion
The design, modelling and application of agent-based control system to sets of 'clustered' controller agents was investigated using a directed communication graph (DCG). The cluster algorithm technique was propose for assigning decision tasks to agents to reach global coordination, with focus on rail vehicle applications. The outcomes include behavioural pattern and trends of agents and multi-agents usage 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 nodes will be addressed in future work.