Design and Analysis of Optimization based Integrated ANFIS- PID Controller for Networked Controlled Systems (NCSs).

Abstract Frequent occurrence of control loops in network systems leads to various issues such as packet loss, random delays, multi-packet transmission etc. Actually, in networked control systems, random delays present more significant and challenging issue. In order to enhance the performance of the network, various soft computing techniques were presented in previous works for both scenarios i.e. with delay and without delay, in which Fuzzy-PID controllers were regarded as the most efficient one. However, it is analyzed that Fuzzy-PID approach lacks in some aspects that leads to inefficient system performance. Therefore, in this paper, a novel and more efficient approach is introduced, i.e. ANFIS-PID controller. Also, this presented ANFIS-PID controller is a modified version of traditional ANFIS approach and it is optimized by using Grey Wolf Optimization (GWO) algorithm. The simulation of the proposed approach is processed for both with and without time delay consideration to perform analysis over Peak Overshoot, Settling Time and Rise Time of the network. The outcomes represent that the proposed model is quite efficient and successful to achieve the system output with lesser transmission delays and packet dropouts along with the enhanced accuracy level in comparison to the traditional system.


Introduction
Recently, the communication technique, as well as digital control, has illustrated outstanding progress that prompts the emergence as well as the growth of Networked Control Systems (Baillieul & Antsaklis, 2007;Gupta & Chow, 2010;Vinogradov & Savchenko, 2019;W. Zhang et al., 2001). The networked control systems are fully distributed feedback control systems where a control loop is closed through a communication network to associate actuators, sensors, and controller. The Networked Control Systems are used due to its decreased network wiring as well as an expense; enhance system flexibility as well as reliability and system diagnosis and maintenance is facilitated (Yang, 2006). Therefore, in several contexts like aircraft, remote surgery, automobile, intelligent transportation and manufacturing plant the NCSs are becoming significantly famous (Bengaid et al., 2006;Cao et al., 2017;Wang & Yang, 2019). In any case, the limited bandwidth and restricted service in communication systems cause various new issues and difficulties, for example, random delays, multi-packet transmission, packet losses, and packet disordering (Brindha & Jayapal, 2018;Han et al., 2016;Qiao et al., 2019; L. X. Zhang et al., 2013). Generally, packet losses imply that the delay of the packet transmission over systems is unlimited. Multi-packet transmission happens when the data to be transmitted is also broadly dissipated; i.e., the delay for pressing all the dispersed data into one packet is too long to even consider guaranteeing the packing proficiency. At the time delays of the packets transmission on systems are diverse the Packet disordering occurs which results in that the packet transmitted previously arrives at the destination node later or vice versa. Therefore, it can be shown that multi-packet transmission; packet disordering and packet losses are majorly caused by the occurrence of random delays. Therefore, in networked control systems, the random delays are the major issue and challenge and basically, several stochastic factors such as nodes competition, network congestion, and network load affect the randomness of delays (Luck and Ray, 1990). In Networked control systems there are majorly a couple of random delays that are controller-to actuator delay (C-A delay) in the forward network channel and sensor-to-controller delay (S-C delay) in the backward network channel. For the performance deterioration as well as potential instability of networked control systems the random delays are the main causes. Among ideal assumptions, the traditional control theories like nondelayed sensing and actuation should be re-estimated before it is applied to network controlled systems that prepare the study and architecture of networked control systems very complicated. It is required to establish the mathematical model of random delays before compensation to compensate for random delays in networked control systems. In networked control systems, this issue has desired strong research interests in the control community. In general, in networked control systems for the random delays, the four types of modeling mechanisms have been introduced.

Fuzzy PID controller in random time delay network
Network control mechanism decreases the routing costs, remove the specific maintenance communication channels, attain resource sharing in the communication mechanism, like Ethernet or CAN bus as well as other transmission channels have been broadly utilized as the public communication.
There is an issue of transmission delays as well as packet dropouts that is the random alteration in network delay among time that can reduce the control performance. The network delay is the major factor causing the network performance degradation in networked control systems, among time the network delay is a variable that brings several complexities to the controller deliberation in NCS. Recently, in order to deal among the issues occurred due to transmission delays as well as packet dropouts the application of NCS based on the fuzzy logic controller is confirmed to be efficient. In (Huang et al., 2010), the author had illustrated that these mechanisms, as well as controller, cannot adjust the parameters of the controller online by the application of genetic paradigm as well as fuzzy logic, in order to examine the network environment NCS controller design and simulation experiments. The Fuzzy logic controllers have the capacity in order to implement the optimal performance of the PID in the control loop of the nonlinear time-varying mechanisms .

Model of Fuzzy PID controller
A couple of sections are majorly considered in the delay of the loop network mechanism that is the sensor to controller delay τ sc and controller to actuator delay τ ca .The procedure of the network may be treated as a random time delay method, here, for the single time delay the distributed time delay is decreased, that may decrease the design complexity of the controller mechanism in a great manner. For random time delay network, the Fuzzy PID controller model is depicted in Figure 1 (Liu et al., 2016).

Optimization Techniques
To discover the optimal resolution beneath particular conditions the optimization mechanism is applied. The optimization issue can be increased or decreased by the optimization. The various optimization mechanisms are discussed below as: (1) Classical Optimization Techniques (2) Advanced Optimization techniques The techniques come under Advanced Optimizations techniques are Genetic Algorithm, Particle Swarm Optimization, Grey Wolf Optimization and so forth.

Genetic algorithm
In 1970 the John Holland has proposed the Genetic paradigm shown in Figure 2 that is an adaptive heuristic research mechanism on the basis of the population genetics. On the basis of real selection and the real genetics the possible research paradigm is the genetic paradigm. Among the set of resolutions, the genetic paradigm is initiated that is known as population. A chromosome is applied to present the resolution. Throughout every generation the size of the population is preserved. According to the fitness significances for the next generation the chromosomes are possible to be chosen after the fitness of every chromosome is calculated at every generation. Various chromosomes that are chosen arbitrarily mate and generate offspring. While generating the offspring, crossover and mutation exists at random. Due to the high fitness significance the chromosome has more possibility to be chosen. The novel produced chromosomes have higher average fitness comparative to the old generation chromosomes. Till the end provision is fulfilled the procedure of the evolution is repetitive. The chromosomes are also known as strings that are the resolutions of the genetic paradigm and presented with the help of lists or strings in several cases.
To detect accurate or estimated resolutions to optimization and research issues the genetic paradigm is a research method that is applied for evaluation. The genetic paradigms are classified as the global research heuristics. Genetic paradigm is a specific set of evolutionary paradigms (EA) in which the inheritance, mutation, selection, and crossover mechanisms are applied. In several provinces like biology, engineering, computer science, and social science the genetic paradigms have been applied to search optimal resolutions to the complicated issues.
To enhance the damping and to sustain the steadiness of the power mechanisms for the synchronous generators the Genetic Algorithm tuned PID controller is deliberated. Within the plant to balance the level the Genetic algorithm tuned fractional and integer PID controller is deliberated.

Algorithm 1:
The basic pseudo code is illustrated below

Particle swarm optimization
In the n dimensional space an optimal resolution as a point or a surface is presented by the Particle Swarm Optimization (PSO) that is a global optimization paradigm to deal among the issues. In this position the Hypotheses are located and started at early velocity with communication channels in the particles. By the resolution position the particles shifted and are estimated due to various criteria afterward every time step. In the communication set the particles are speed up to the particles among improved fitness significances on time. The major advancement of this mechanism is that the huge count of members constructing the particle set structures this scheme flexible to the negligible issue comparative to another global minimization mechanism that is the simulated annealing. The major drawbacks of this Optimization Technique are that: • This technique simply undergoes from the partial optimization, due to which it is minimum accurate at the regulation of its speed and the direction.
• The issues of scattering and optimization cannot be resolved by Particle Swarm optimization.
• The issues of a non-coordinate system like the solution to the energy field and the moving rules of the particles in the energy field cannot be solved by this technique.

Grey Wolf optimizer
In this method the optimum spectrum scaling is used. On the basis of hunting method of grey wolf family, the GWO is currently generated swarm intelligence. The several steps of GWO are discussed below as:

a). Initialization of grey wolf positions
For multimodal fusion the number of iterations and population values are tested among several values through utilizing trial and error mechanism and fixed the limits as 50 iteration and 50 scale values.

b). Fitness function
In multi-scaled medical image fusion for the optimal selection of the scale values the GWO paradigm was utilized. For multimodal fusion the Mutual Information is a quantitative measure that offers the amount of information preserved in the fused image.

c). Social hierarchy of grey wolf family
The grey wolves are better in social leadership naturally and they are being in a pack. There are 5-12 members are contained in the grey wolf-pack. In 4 levels the hierarchical order of pack is alienated that are omega (ω), alpha (α), delta (δ) and beta (β). Generally, the primary level hierarchy, related to hunting the alpha is making decisions, time to wake, sleeping place and so on. The beta is the second level hierarchy that activates the finest subordinates to alpha in pack. In grey wolf omega is the lowest level hierarchy that plays the role of scapegoat. Always the omega wolves have to offer to the rest entire hierarchical wolves. If a wolf is not an alpha, beta, or omega is known as delta wolf in a grey wolf family. Omega is dominated by them but to the alphas and betas they have to be submitted.

d). Encircling prey
The prey is encircled before attacking throughout the grey wolf hunting the prey. It is illustrated in the mathematical expressions as: Here, t = current iteration, X P �! = position vector of the prey, X= the position vector of grey wolf,

e). Hunting
After searching the position of prey of grey wolves and also after encircling them generally, through the guidance of alpha the hunt is directed. The delta and beta should also help in a pack. Followed by beta and delta the alpha has the finest information regarding prey location. The present iteration forwards three finest search agents delta, beta, and alpha to the next level in the grey wolf optimization, as rest of the entire agents are treated as gamma in grey wolf family.
The following equations are illustrated below as:

f). Attacking prey
As the moving grey wolves are stopped by prey then through attacking the prey the hunt is finished. The grey wolves required to reduce the value of ã while approaching the prey.

g). Search for prey
On the basis of the location of the delta, alpha, and beta the grey wolves generally found. In order to find prey, they diverge from one another whereas to attack prey they converge.

Algorithm 2:
The Grey wolf population is initialized Xi (i =1, 2 …, n) a, A and C are initialized The fitness of every search agent is computed X α = the finest search agent X β = the second finest search agent X δ = the third finest search agent While (t < Maximum number of iterations) for every search agent With the help of above equations, the location of the present search agent can be upgraded end for a, A and C is updated The fitness of all search agents is computed In order to resolve the optimization issues, the GWO is theoretically capable; various points may be noted as: • In order to save the finest resolutions acquired so far on the course of iteration, the projected social hierarchy aids GWO.
• The projected encircling mechanism describes a circle-based neighborhood around the resolutions that can be expanded to high dimensions as a hyper-sphere • In order to have hyper-spheres among diverse random radii, the random parameters A, as well C, aid candidate resolutions.
• In order to situate the possible location of the prey, the projected hunting mechanism permits candidate resolutions.
• Through the adaptive values of a AND a, exploration and exploitation are assured.
• GWO is allowed by the adaptive values of parameters and A in order to smoothly transition in exploitation and exploration.
• By reducing A, to exploitation (|A|<1) the half of the iterations are devoted and the rest are dedicated to the exploration (|A|≥1).
• There are only a couple of parameters, a and C, that are to be adjusted in GWO.

Artificial Neuro fuzzy inference system
The combination of Artificial Neural Networks and Fuzzy Logics has created a hybrid artificial intelligence technique that is a Neuro-fuzzy technique. One of the most popular Neuro-Fuzzy technique is Artificial Neuro-Fuzzy Inference System that is also known as ANFIS proposed by Jang (1993). The learning ability, as well as relational structure, of the artificial neural networks among decision-making method of the fuzzy logic is combined in ANFIS. As in artificial neural networks by utilizing train data set, the ANFIS realizes learning among samples. In this manner, to resolve the related issue, the most ideal ANFIS structure is attained. The major drawback of the artificial neural network is that the weight values attained could not be explicated. The Fuzzy Inference system that exists in the ANFIS structure is used to remove this drawback of the artificial neural networks. Also, several real-world issues are resolved by this structure. A detailed overview of Artificial Neuro-Fuzzy Inference system is offered in this section.

Artificial neuro-fuzzy inference system
A couple of sections named as premise and consequence sections are contained in the network structure of ANFIS. Training ANFIS implies determination of the parameters belonging to these parts by using an optimization technique. Throughout training, the ANFIS utilizes the current I/O data pairs. At that point, IF-THEN fuzzy rules that these sections are associated to one other are attained (Jang, 1993).
Five layers are contained in the structure of ANFIS as shown in Figure 3. There are a couple of inputs and a single output is given in this Figure of ANFIS structure and it is composed of four membership functions, as well as four rules. Consistent with the ANFIS structure shown in Figure 3, the layer structure of ANFIS is illustrated below as:

Layer 1
First layer that is Layer 1 is known as Fuzzification Layer. To attain the fuzzy clusters from input values, the membership functions are used by the Fuzzification Layer. The parameters such as decide the form of membership function are known as premise parameters. The premise parameter set is {a, b, c}. By utilizing these parameters, the membership degrees of every membership function are evaluated, as shown in Equation (8) and (9). The membership degrees attained from this layer are illustrated amongμ x and μ y .

Layer 2
The Layer 2 is known as Rule Layer. By utilizing the membership values calculated in fuzzification layer, the Firing strengthsðw i ) for the rules are created. By multiplying the membership values, the w i values are found as follows:

Layer 3
The Layer 3 is known as Normalization Layer. Belonging to every rule, it evaluates normalized firing strengths. The normalized value is the proportion of the firing strength of the i th rule to the total of all firing strengths as shown in Equation (11).

Layer 4
The fourth layer of the ANFIS structure is Defuzzification Layer. As shown in Equation (12), the weighted values of rules are evaluated in every node of this layer. By utilizing first-order polynomial this value is determined.
Here, w i = output of the normalization layer {p i , q i , r i } = parameter set These parameters are known as the consequence parameters. The count of consequence parameters of every rule is one more compared to the count of input.

Layer 5
This layer is known as the summation layer. In defuzzification layer, the exact output of ANFIS is attained through summing the resultant outcomes attained for every rule.

Related work
In (W. Zhang et al., 2001) the author had illustrated that the occurrence of a communication network in a control loop persuades several imperfections like varying sampling/transmission intervals, communication constraints, varying transmission delays, quantization effects and packet loss that can degrade the control performance effectively as well as direct to instability. For stability study as well as controller design for the NCSs several mechanisms have been projected in the related work. The major concern of this work was to review the primary research lines in a comprehensive manner. The major concern of this work was to review the primary research lines in a comprehensive manner . The control performance of the system was not improved to a greater extent . The stability of the system was not improved that much.  Baillieul & Antsaklis (2007) had introduced the fundamental problems included in deliberating successful NCSs, in order to offer a wide snapshot assessment of the present condition of research in the field, to suggest helpful future scope as well as in addition to offer a wide perspective on current fundamental outcomes. While surveying present research on networked control mechanisms the author had found that current theoretical advances, as well as target applications, were well intertwined. The author had aimed to offer a bridge in networked control mechanisms as well as nearly associated contemporary work dealing among sensor networks as well as wireless communication protocols. Gupta & Chow (2010) had introduced the Networked control systems and its diverse forms. Initially, the evolution, as well as history of networked control systems, was discussed. Additionally, several domains, as well as research areas like network delay, scheduling, integration of components on a network, networking technology, network resource allocation, and network security in real-time NCSs, fault tolerance and so forth, were concerned.
The nonlinear methods among time delay network control were conferred transmission delays, as well as packet dropouts for NCS among random time delay, were studied (Fang Liu et al., 2016). In order to attain the delay value that was an input parameter of the fuzzy adaptive PID controller, the online delay estimation mechanism is used in this work. On the basis of GA as well as PSO, the fuzzy PID temporal adjustment took place in order to optimize an objective function. Additionally, to enhance the system stability by MATLAB co-simulation tool True Time the three parameters of PID were adjusted. The simulation results had demonstrated that the transmission delays and packet dropouts were decreased by the fuzzy logic control system based on PSO algorithm. For NCS applications the quality of Fuzzy PID controller's comparative to the conventional PID controllers was also illustrated in this work. Hao et al. (2010) had offered a fuzzy adaptive PID control as well as Smith predictive control in order to enhance the resistance capacity to random disturbance as well as to conquer the time delay character of the controlled object.
In (Xudong Liu et al., 2014) the servo system based on Smith predictor was deliberated in order to resolve the issue of time delay network. The adaptive least mean square (LMS) delay prediction paradigm, as well as Smith compensator was combined by the control strategy that could compensate a specific degree of network delay.
HongeRen & Guo (2015) and Chen et al. (2014) had projected an enhanced fuzzy adaptive PID-Smith Predictor on the basis of the traditional Smith Predictor. In this work, a fuzzy self-tuning PID controller was utilized as the primary controller rather than the conventional PID controller.
In order to minimize the impact of random delays and packet loss, dual-rate controller technique was regarded as efficient. Thus, in (Tran et al., 2017), the author combined the fuzzy controller with a dual-rate controller in an NCS for regulating the gain parameter online.

Problem formulation
Through time domain optimal tuning of Fuzzy PID controllers the problems of stochastically varying network delays as well as packet dropouts in Networked Control System applications have been tended (Chen et al., 2014). In the loop feedback control system, the network communication control system is introduced; the NCS is a network formed a feedback control mechanism. Specifically, at the time of assessing the performance of the control loop, the delays introduced through the network as well as packet dropouts are of prime concern. In the existing work, the existing work a fuzzy adaptive PID controller is utilized for NCSs among time delay. In the existing work, the PID controller is utilized to control the random time delay of the networked control systems along with the help of fuzzy system that is good in decision-making. The major drawback of fuzzy is that it can give best results only in defined cases whereas the cases are not defined then it will not offer suitable results for the undefined case. Therefore, optimization algorithms are used to solve this issue of fuzzy, for which different algorithms were presented that are discussed previously in section 2. The existing work was better in terms of adjusted PID three parameters online but there are some issues also. In the traditional mechanism their accuracy can be enhanced as well as learning time can also be reduced of the optimization techniques for which a new method has to be proposed.

Motivation
In order to enhance the performance of the system, more efficient and better system is required than traditional Fuzzy-PID controller. It has been scrutinized that ANFIS is a system which is more efficient than the fuzzy system as ANFIS is a combination of an artificial neural network (ANN) and fuzzy inference system (FIS). Combining the ANN and fuzzy-set theory can provide advantages and overcome the disadvantages as it has features of both techniques. Therefore, ANFIS-PID controller is opted in the proposed work as it is expected to be more successful approach than previous one.
Also, it has been analyzed that in some of the previous works, when the Fuzzy-PID system was optimized with some algorithms (Fang Liu et al., 2016), then it gave more efficient results than the fuzzy system without optimization. Inspired from this, the optimization approach is implemented in the proposed work to tune ANFIS-PID system, so that its performance can be enhanced more. The next challenge that came across is the selection of the algorithm for the optimization of the ANFIS-PID Controller. After analyzing the different optimization algorithms, the GWO algorithm is implemented in the proposed work for optimization. GWO is selected among different algorithms because it has following advantages:

Advantages of GWO over other Optimization Techniques are illustrated below as:
(1) Because of simple structure it is easy to implement.
(2) Compared to the other techniques it requires less storage.
(3) Because of Continuous decrease of search space and Decision variables are very less (α; βandδ) the convergence is faster.
(4) In addition, at the time applied to composite functions, the local optima are evaded.
(5) There are only a couple of parameters have to be adjusted that are: a, and C.
As these advantages make GWO superior than other algorithms, thus it is selected for optimization of the proposed ANFIS-PID controller system.

Proposed work
As illustrated in the above section a new mechanism is proposed in this work in order to conquer the issues of the traditional mechanism. As the fuzzy has a drawback in terms of undefined cases (Fayek and Elanvazuth, 2013;Oyas Wahyunggoro, 2008) so it is needed to be replaced with an advanced technique that is Artificial Neuro Inference Fuzzy System which offers better results in both defined and undefined cases comparative to the fuzzy system. ANFIS system is generally an adaptive fuzzy system generated by exploiting the equalities in fuzzy schemes as well as specific forms of neural networks. ANFIS scheme is much more accurate than the Fuzzy system.
Only Neuro-Fuzzy is not sufficient for the mechanism, it also requires more data to offer more accuracy for which it is needed to be optimized by an optimization algorithm. Grey Wolf Optimization is used to optimize Neuro-Fuzzy system to offer more accuracy than the traditional mechanism. In GWO method the optimum spectrum scaling is used. On the basis of hunting method of grey wolf family, the GWO has currently generated swarm intelligence. The several steps of GWO discussed above are Initialization of grey wolf positions, Fitness function, Social hierarchy of grey wolf family, Encircling prey, Hunting, attacking prey and Search for prey and in addition, the algorithm for GWO is also illustrated in this work that is demonstrated above in Algorithm 2. Therefore, the proposed GWO tuned ANFIS-PID Controller can be advantageous for NCS in several ways such as: the issues of previous Fuzzy-PID can be overcome by using ANFIS-PID controller and thus it can make the efficient decisions in both defined and undefined cases by making the system intelligent. And also, the optimization using GWO makes it faster and more stable as well as efficient.

Results analysis
After implementing the proposed work in MATLAB, the results are acquired by using ANFIS-PID controller along with GWO algorithm to reduce transmission delays and packet drops with more accuracy. The sampling time is presumed to be 0.01 seconds, as the delay of every packet is less than 0.01s the sequence is sustained otherwise packets arrive out of sequence. The closed-loop system among random time delay whose transfer function is: The closed-loop system without random time delay whose transfer function is: The unit step function is a system input; the PID controller is used to observe the resultant value of the network delay mechanism. Figure 4 depicts the membership function of error. The range of error is shown on the x-axis and varies from −10 to 10 whereas the degree of membership is shown on the y-axis that ranges from 0 to 1. Here the negative curve is shown in the blue line whereas the positive curve is shown in the red line.   Figure 6 represents the basic model of the ANFIS system. In this system, a couple of inputs are given to the ANFIS (Sugeno) model which processes the acquired inputs and provide four outputs generated on the basis of 4 rules applied to the given inputs.
The graph of Figure 7 depicts the comparison of PID and ANFIS-PID with delay. In this figure it is shown that the settling time, rise time and peak overshoot of the proposed work that is ANFIS-PID is better than the traditional PID technique. The comparison of traditional Fuzzy-PID and ANFIS-PID with delay is shown in Figure 8. The values of traditional method that is Fuzzy-PID method are high compared to the proposed method.
The graph of Figure 9 depicts the comparison of traditional techniques that are PID and Fuzzy-PID with the proposed technique that is ANFIS-PID with delay.      The comparison of Fuzzy-PID and ANFIS-PID without delay is shown in Figure 11. In this graph it is shown that the values of proposed work are less than the traditional method. The graph of Figure 12 shows the comparison of PID, Fuzzy-PID, and ANFIS-PID without delay. The values of Settling Time, Rise time and Overshoot are shown in Table 3. In this graph, it is shown that the proposed techniques offer better results as less settling time, less rising time and minimum overshoot comparative to the traditional techniques.
The fitness function of GWO is shown in the graph of Figure 13. In this graph, it is shown that on the y-axis fitness value is varied from 5 to 10 ×10 4 whereas the number of iterations is shown on the x-axis that ranges from 0 to 15. This is how the best fitness value is attained in GWO in order to attain more accurate results.

Conclusion
The networked control system has been worldwide accepted due to its various features such as wireless networking, enhanced flexibility, reliability and easy maintenance. In this work, the networked control system among random time delay is examined through ANFIS-PID controller. Along with this the optimization is done by using Gray Wolf Optimization algorithm in order to reduce transmission delays and packet dropouts in a more accurate  manner comparatively traditional mechanisms. The evaluation of three parameters demonstrate that the proposed work offers minimum overshoot, minimum settling time and minimum rise time comparative to the conventional techniques that are PID and Fuzzy-PID. Hence, it is proved from the simulation results that the proposed mechanism, i.e., GWO based ANFIS PID offers better and more accurate results with delay and without delay.