Particle swarm optimization based networked control system design with uncertainty

This study discusses the design of state feedback control for networked control system (NCS) with uncertainty, where the feedback controller is used to solve the latency and the packet dropout caused by NCS. The conventional design approach generally adopts Lyapunov stability theorem to analyse the stability of NCSs and then Lyapunov-Krasovskii stability criterion is solved to obtain the control gain matrix. Rather than using complex Lyapunov-Krasovskii stability criterion and solving difficult linear matrix inequality (LMI) problem in the control design, this study attempts to utilize particle swarm optimization (PSO) algorithm to search an optimal feedback control gain for the NCS. Finally, the computer simulation is illustrated the proposed control strategy and demonstrated the control performance.


Introduction
Nowadays, increasing attention has been paid to design of networked control systems (NCSs) in which the components (e.g., sensors, actuators, and controllers) are spatially distributed and connected via a share communication network [1][2][3][4][5][6][7][8][9][10].In NCSs, data is transmitted in atomic unit called data packets.To transmit data packets, the system states and output signals are sampled by the sensors, transmitted to the controllers over the network, and finally the controller signals are transmitted to the actuators by the data packets.The actuators would control the controlled plants according to the receiving data packets.
Two major challenges in NCSs are the effects of "latency" and "packet dropout" on the system performance [11].The former is caused by propagation, transmission, router, processing, computer, etc., and the latter is resulted from network congestion, multi-path fading, faulty network drivers, etc.To treat the mentioned effects, several methods have been proposed.For example, [2,8] adopted ∞ H control theory to stabilize NCSs and analysed the system robustness.[3] applied state feedback control method to treat the control problem of NCSs.[4] applied Takagi-Sugeno (T-S) fuzzy control technique to guarantee the stability of NCSs.
While the state feedback control applying to NCSs, the conventional approach generally adopts Lyapunov stability theorem to analyse the stability of NCSs.Then solving Lyapunov-Krasovskii stability criterion, resulted from Lyapunov stability theorem, could attain the control gain matrix [2,8].Generally speaking, Lyapunov-Krasovskii stability criterion is characterized in terms of a linear matrix inequality (LMI) problem or an eigenvalue problem [12].However, solving LMI or eigenvalue problem is difficult and generally obtains a feasible solution.
Particle swarm optimization (PSO) algorithm, proposed by Kennedy and Eberhart in 1995 [13], was inspired by the social behavior of bird flocking and fish schooling.It works by maintaining a swarm of particles that move around in the search space influenced by the improvements discovered by the other particles.One important advantage of PSO algorithm is that it does not use the gradient of the problem to be optimized.Therefore, PSO algorithm can be readily employed for a host of optimization problems and has received considerable research interest [14][15][16][17].On the other hand, owing to its simplicity of implementation and ability to quickly converge to a reasonably good solution [18], PSO algorithm has been successfully applied in solving many real-world optimization problems.
With the help of randomly searching ability of PSO algorithm, this study attempts to utilize PSO algorithm to search the optimal control gain matrix for the NCS with uncertainty, instead of solving complex LMI or eigenvalue problem.The computer simulation is illustrated the proposed control strategy and demonstrated the corresponding control performance.
This study is organized as follows: The problem formulation of NCS is given in section 2. Section 3 presents the control scheme of PSO based NCS.In section 4, computer simulation will be given to illustrate the control performance of the proposed control strategy.Section 5 concludes the paper.

Problem formulations
Figure 1 illustrates a class of the networked control system which is consisted of the following five parts: a sensor, a controller, a zero-order-hold (ZOH), a communication network channel, and a controlled plant [18].In the figure, the ZOH plays a role of an actuator.Consider the following controlled plant with uncertainty [8,19]: is the uncertainty state matrix.The initial state vector is given as . Without loss of generality, we make the following assumptions [8,19]: Assumption 3: A Δ is unknown, but bounded.In the NCSs, the controller is connected with the sensor (or ZOH) via a share communication network channel (consisting of propagation, transmission, router, processing, computer, storage delays, etc.).The use of a share communication network will lead to latency.In addition, network congestion, multi-path fading, and faulty network drivers would cause the packet dropout.Latency and packet dropout might be potential sources to instability and poor performance of NCSs.
Figure 2 shows latency and packet dropout of NCSs.Because of latency and packet dropout, packets are transmitted from the sensor to the controller spend sck τ , and from the controller to the actuator spend czk τ .Define the total latency as at every sampling instant k t and make the following assumptions for the total latency and packet dropout [2,8,20]: Assumption 4: The total latency k τ is bounded.
, where max Here, we adopt the state feedback control into inhibit the effect of the latency and the packet dropout such that the state vector ) (t In the state feedback control scheme, the controller is designed as follows: where K is the control gain matrix and is obtained by solving the Lyapunov-Krasovskii stability criterion.Solving the stability criterion generally requires calculating the complex LMI problem.It is a difficult task sometimes.Rather than using LMI solver, this study attempts to apply PSO algorithm to obtain the control gain matrix .

PSO based NCS design
PSO algorithm uses a simple mechanism that imitates their swarm behaviors to guide the particles to search for globally optimal solutions.In PSO algorithm, each potential solution is regarded as a particle associated with two vectors, i.e., the velocity vector and the position vector.During the evolutionary process, the trajectory of each individual is adjusted by dynamically altering the velocity of each particle, according to its own flying experience (pBest) and the flying experience of the other particles (gBest) in the search space.With such a search mechanism, the particles have a tendency to fly towards better search area over the course of search process.
In past, the optimal control parameters used in NCSs are obtained by solving the Lyapunov-Krasovskii stability criterion.Such a solving process is complex and generally obtains a feasible solution.In addition, the network communication quality is also unpredictable.Thus, it is impossible to describe latency and packet dropout of NCSs accurately.Sequentially, the gradient of system state cannot obtain.With the help of randomly searching ability of PSO algorithm, this study applies PSO algorithm to search the optimal control gain matrix K , instead of solving the complex Lyapunov- Krasovskii stability criterion.The following procedure can be used for searching the optimal control gain matrix with PSO algorithm.
Step 1: Initialize the swarm by assigning a random position o i K and the corresponding velocity and N represents the size of the swarm.Also determine the maximum number of generations J max .
Step 2: Evaluate the fitness value for each particle.In this study, the fitness function is defined as where j i K denotes the ith particle for the jth generation.
Step 3: Update the best position for each particle pBest i K and the global best position gBest K by ( 4) and ( 5), respectively.
where pBest i K represents the position with the best fitness found so far for the ith particle and gBest K is the best position discovered by the swarm.
Step 4: Update the position and the corresponding velocity for each particle using where w is the inertia factor, 1 c is the "self-confidence" factor, 2 c is the "swarm confidence" factor, and 1 φ and ⋅ 2 φ are two uniformly distributed random numbers independently generated within [0, 1].
Step 5: Repeat Steps 2-4 until a stopping criterion is fulfilled (e.g., the maximum number of generations or the goal is reached).And, K gBest is the optimal control gain matrix.the dynamic equations of the inverted pendulum system can be described as follows: where m c is the mass of the cart, m p is the mass of the pole, M = m c + m p , g = 9.8 m/s 2 is the acceleration due to gravity, and l is the half length of the pole.In this study, the parameters are set as m c = 1 kg, m p = 0.1 kg, l = 0.5 m, and the sampling period as 0.001sec.In addition, the unknown external disturbance ω(t) is a uniformly distributed random number independently generated within [−0.1, 0.1] and the initial state as x(0) = [π/6, 0] T .The Jacobian linearized model around the equilibrium x(0) = [0, 0] T can be obtained directly from the dynamic equations ( 8), which yields where A Δ is be regarded as the uncertainty terms due to latency, packet dropout and linearization error.In the simulation, each entry in A Δ is a uniform random number between −0.1 and 0.1.
In the simulations, three PSO variants, i.e., the standard PSO (Std.PSO), PSO with a linearly varying inertia weight (PSO-LVIW, [22,23]), and PSO with time-varying acceleration coefficients (PSO-TVAC, [24]), were tested using the same swarm size of 100.Each algorithm was run 50 independent trials with the same maximum number of generations J max = 100 for each trial and their worst, mean and best results are used in the comparison.Shi and Eberhart [22,23] suggested that when w is medium (0.8 < w < 1.2), the PSO will have the best chance to find the global minimum, but also takes a moderate number of generations.Besides, as mentioned in Kennedy and Eberhart [13], a recommended choice for the factors c 1 and c 2 is a fixed value of 2 since it on average makes the weights for "social" and "cognition" parts to be 1.This setting also has been adopted by many other researchers.With the help of the above suggestions, the parameters used for the standard PSO is set as w = 1 and c 1 = c 2 = 2.As suggested in Shi and Eberhart [23], the inertia weight for PSO-LVIW was set to change from 0.9 to 0.4 over the generations.Besides, the boundary values of acceleration coefficients for HPSO-TVAC were set as c 1,0 = 2.5, c 1,f = 0.5, c 2,0 = 0.5, and c 2,f = 2.5, which are the best ranges for c 1 and c 2 suggested by Ratnaweera [24].In the simulation, the PSO based NCS is also compared with the real coded genetic algorithm (RCGA) based NCS, where RCGA makes use of uniform arithmetical crossover with the crossover rate of 0.8 and uniform mutation with mutation rate of 0.1 [25].Finally, the fitness function is defined as where T = 5 in the simulation.All the programs coded by Matlab version R2014b were executed by a personal computer with Intel ® Core ™ i5-3470 CPU @ 3.20/3.60GHz processor, 16.0-GB RAM, and Windows 7 with service pack 1 operating system.
The best, worse and mean fitness of the best-of-run solutions for each algorithm are presented in  5.The simulation results show that the proposed control strategy implemented by each evolution algorithm could perform good stability and inhibit effectively the effect of "latency" and "data packet dropout".In order to compare the convergence speeds and reliabilities (success performance) of different algorithms, this study selects a threshold value of 6.6 to determine whether a trial (run) is successful or not.The success of an algorithm means that the algorithm can result in a fitness value no worse than the prespecified threshold, with the number of generations less than the corresponding maximum number.The success rate is calculated as the number of successful runs divided by the total number of runs.Table 2 lists the success performance (SP) and average computational time of each algorithm required to reach such a predefined threshold, where FEs represents the number of function evaluations.In addition, the success performance is defined as SP = mean (FEs for successful runs)*(# of total runs)/(# of successful runs) [26].As can be seen, PSO-LVIW and RCGA yield the best success rate of 98.0%, but the standard PSO achieves the best SP.Although PSO-TVAC has the worst success rate, it also performs an acceptable reliability of 92.0%.Besides, the standard PSO performs significantly faster than PSO-LVIW and RCGA on the average computational time.To sum up, with almost the same best fitness value, the standard PSO with w = 1 and c 1 = c 2 = 2 outperforms the other three approaches on the efficiency and reliability for the considered NCS with uncertainty.

Conclusions
Rather than using complex Lyapunov-Krasovskii stability criterion and solving the difficult LMI problem, this study applies the PSO algorithm to search the optimal control gain matrix for NCS with uncertainty, where the feedback controller is used to compensate the latency and packet dropout.The simulation results on an inverted pendulum system show that the PSO based NCS could perform good stability and inhibit effectively the effect of latency and data packet dropout.In addition, the optimal control gain obtained by the standard PSO performs the best success performance and the least computational time on the considered problem.

Figure 1 .
The framework of PSO-NCS.

Table 1 ,
where Std.Dev.represents the corresponding standard deviation.In addition, the optimal associated with the best fitness for each algorithm is given in the last column of Table1.Since the best fitness values obtained by different algorithm are almost the same, their responses, including the curve of control signal u(t) and the trajectories of x 1 (t) and x 2 (t), are close to each other.Figures3 and 4therefore only illustrates the trajectories of x 1 (t) and x 2 (t), respectively, obtained by the standard PSO algorithm, where the solid and dotted lines represents the trajectories corresponding to the best and worst fitness, respectively.The corresponding control signal u(t) is shown in Figure

Table 1 .
Performance comparison on fitness value and the optimal gain.

Table 2 .
Comparisons on success performance and convergence speed.