Research on Optimization of Fuzzy Network Control System Based on New Smith Predictive Time Delay Compensation

Aiming at the problem of network delay when the network control system transmits data, this paper adopts a new type of fuzzy control method of Smith predictor to compensate for the delay. In actual application scenarios, it is difficult to accurately match the Smith prediction model with the actual model. At the same time, the quantization factor and scale factor in the fuzzy PID controller are too dependent on experience, which makes the system’s adaptability to actual working conditions very poor. In this paper, genetic algorithm is used to optimizes fuzzy PID. According to the simulation results, when the Smith predictive model does not match the actual model, the steady-state performance and dynamic performance of the system under the fuzzy PID control optimized by the genetic algorithm are improved.


Introduction
The Network Control System (NCS) is a closed-loop feedback control system that connects the various sensors, controllers and actuators of the system through a shared communication network [1][2]. Introducing the network into the control system has the advantages of simple installation, scalability and easy maintenance. However, the transmission of information in the network is affected by the network bandwidth and carrying capacity, and there will be problems such as transmission delay and data packet loss, which makes the control signal in the system unable to be transmitted to the controlled object in time.
At present, there is some progress in the research of NCS at home and abroad, but the theoretical research on transmission delay compensation, data packet loss, etc. still fails to effectively solve the practical application problems. Literature [3] proposed a neuron-based controller, combined with a differential first algorithm to optimize the control system; Literature [4][5] all proposed research methods based on improved Smith predictive compensation system, which can solve the problem of being controlled Object model mismatch and interference; literature [6] proposed the use of fractional-order algorithm to design the controller. The advantage is high control accuracy, but there are too many parameters in the controller and the tuning is too complicated, which has certain limitations in practical applications.
In this paper, the fuzzy controller is optimized by genetic algorithm based on the new Smith predictor and compensation structure. The new Smith predictor can effectively eliminate the system time delay and make the system respond quickly. The fuzzy controller can improve the robustness of the system. After the algorithm optimizes the fuzzy controller, the system is more adaptable to the on-site 2 environment and can find the optimal controller parameters to make the overall network control system perform better.

New Smith Time Delay Predictor
Aiming at the large delay characteristics of the network control system, this paper adopts a new Smith delay estimation controller, as shown in Figure 1. Smith predictive compensation is mainly aimed at the closed-loop characteristic equation containing pure lag in the pure lag system. On the basis of PID feedback control, a predictive compensation link is introduced, so that the closed-loop characteristic equation does not contain a pure lag term, which improves the overall system performance. Control performance quality. The When the predicted model of the controlled object is the same as the real model, that is, m At this time, the closed-loop characteristic equation of the system is: (4) It can be seen from formula (4) that the closed-loop characteristic equation does not contain time delay parameters, which eliminates the factors affecting the stability of the system and effectively improves the control performance of the system.

Fuzzy PID controller
Because the traditional controller can only achieve a good control effect under the premise of accurate modeling of the controlled object. When the model of the controlled object is unknown or the model parameters are not completely matched, the traditional controller cannot achieve a better control effect. Compared with the traditional controller, the fuzzy controller can use the input and output fuzzy sets and fuzzy rules. To study and analyze the hidden dynamic characteristics of the controlled object itself. This control method has a strong learning ability, and has strong robustness in random environments and disturbances.
Fuzzy PID (FPID) combines the advantages of fuzzy control and PID control. The input of the fuzzy controller is the error e and the error rate of change ec. After the fuzzy control algorithm is calculated, the output  are used as the setting values of the PID parameters.

Genetic algorithm
Genetic Algorithm (GA) is a search optimization algorithm based on natural selection and group genetic mechanism. First, the genetic algorithm must encode all the parameters that need to be optimized, and perform a heuristic search in the limited solution set space. Secondly, the genetic algorithm must calculate the fitness through the objective function, and the optimization rule also depends on the probability. Finally, individuals are screened through selection, crossover and mutation, and individuals with high fitness are retained to form a new population. Therefore, genetic algorithm is a method to search for the optimal solution by simulating the natural evolution process. It has the characteristics of simplicity, generality, robustness, and multiple parallel processing [7].

Construction of fuzzy PID controller based on genetic algorithm optimization
The genetic algorithm uses a multi-point parallel search method and has global optimization capabilities. It can optimize the quantization factor and scale factor of the fuzzy controller, and then obtain the optimal value of the parameter. The genetic algorithm provides us with a solution for complex systems. A general framework for optimization problems. The structure of the fuzzy PID controller optimized based on genetic algorithm is shown in Figure 2, where Ke and Kec are quantization factors. The fuzzy relationship between the three PID parameters and the error e and the error change rate ec is found through the algorithm, and then the PID parameters are adjusted in real time using the control principle. The parameter tuning expression of the fuzzy PID controller is: In formula (5), p0

Design of Fuzzy PID Controller
The fuzzy PID controller is applied to the network control system, and the control signal output by the controller is given by the fuzzy PID controller optimized by genetic algorithm after analyzing and calculating the input and output variables.

Define the fuzzy universe of input variables and output variables
The input variables are the system error e and the system error change rate ec between the given value and the actual value, and the correction values of the three parameters of the PID controller are used as the output variables.
The fuzzy domain of the system error e is set to [-3,3], the error rate of change is ec, the fuzzy domain is set to [-6,6], and the fuzzy domains of output variables

Membership function and fuzzy rules
In the genetic algorithm, the membership function is very important and can determine the performance of the control system.

Genetic code
When applying the genetic method, the coding problem should be solved first. Different coding methods have different effects on the calculation methods of genetic operators. To a large extent, coding determines the efficiency of genetic evolution. Among them, binary coding has the chara-cteristics of simple operation and easy implementation, and easy implementation of genetic opera-tions, so binary coding is selected.

Fitness function
The fitness function is also called the evaluation function, which is the standard for distinguishing the pros and cons of individuals in the group during the optimization process of the genetic algo-rithm, and it will affect the performance of the genetic algorithm. In the process of optimizing, individuals with high fitness have a high survival probability, and individuals with low fitness will be quickly eliminated. After the genetic algorithm optimizes the parameters, the performance index J reaches the minimum. When J is the smallest, the fitness is the largest. Therefore, the fitness function takes: 1/ F J  。 In order to obtain good system process dynamic characteristics, the integral of the absolute value of the system error is used as the objective function of the selected parameters, and the formula is: In formula (6), ( ) e t is the systematic error.

Genetic operator
In nature, the reproduction and evolution of populations depend on the inheritance of genes. Genetic algorithms mainly generate new individuals through selection, crossover and mutation. The selection operation is to select some individuals from the parent population according to a certain method, and inherit them into the next generation population. Since the fitness of each individual is different, the fitness ratio method is used to select individuals. The probability of each individual in the population and the fitness are proportional. The expression is: In formula (7), n is the population size, x i f ( ) is the fitness of the i -th individual in the population, and P is the probability of the i -th individual being selected.
The crossover operation creates a new individual by exchanging part of the gene series of two paired chromosomes in a specific way. The mutation operation is to simulate the gene mutation phenomenon caused by accidental factors in the natural environment. It is to randomly change part of the gene value of an individual with a small probability.
In the genetic algorithm, the crossover probability and mutation probability both change with the change of individual fitness value. When the individual fitness value is high, the crossover probability and the mutation probability will be reduced, so as to ensure the excellent reproduction of the individual and finally achieve the optimization of the parameters.

Result&Discussion
This article simulates the system based on the network control system structure and the above-mentioned control rate under the Matlab environment. On the basis of Smith time delay estimation, compare the control effect of traditional PID controller, fuzzy PID controller and genetic algorithm optimized fuzzy PID controller on the network control system, so as to verify that the control strategy designed in this paper is effective in delay compensation and time delay. Effectiveness of model mismatch. The model for selecting the controlled object is: In the genetic algorithm, the population size is set to 30, the maximum number of evolutions is set to 100, the maximum crossover probability is set to 0.9, and the maximum mutation probability is set to 0.1. Figure 5 shows the optimization process of performance index J. In the Matlab simulation environment, the input signal of the system is a step signal. It is assumed that the network control system only has time delay in the process of data transmission, and the data packet loss is not considered, and both ca  and sc  are set to 0.5. Simulate the two situations of the Smith predictive model and the system model's complete fit and mismatch respectively.  Figure 6:  It can be seen from Figure 6 that when the model of the Smith predictor is accurately matched with the actual model, the three controllers can have a good control effect, the rise time and the adjustment time are very close, and the system can reach stability at about 7.8s. state. In comparison, the maximum overshoot of the system controlled by the GAFPID controller is 17.2%. When the model of the Smith predictor accurately matches the actual model, the GPAPID controller will also go through a lot of calculations to find the optimal value, so it reaches The steady state time is also longer. Generally speaking, in this case, the control effects of the three controllers are similar. Figure 7: It can be seen from Figure 7 that when the model of the Smith predictor is mismatched with the actual model, the system under the traditional PID control has a large overshoot of 76.3%, and the system reaches a steady state by damping the oscillation, the adjustment time is 17.78s, and the control effect Poor; the time for the system under fuzzy PID control to reach a steady state is reduced by 50.62% compared with the system under traditional PID control. Although the adjustment time is reduced, the dynamic performance of the system is poor and the fluctuation is large; fuzzy PID control based on genetic algorithm optimization Compared with the system under the traditional PID control, the system under the control is reduced by 61.94%, and the system can reach a stable state in only about 9 seconds. The overshoot is also the best in the system performance under the three PID control, which can achieve better control.

Conclusion
In this paper, the fuzzy PID controller is optimized through genetic algorithm in the network control system based on the new Smith estimated time delay compensation. Through Matlab, the traditional PID, FPID and genetic algorithm optimized FPID are applied to the network control system for simulation. The simulation results show that when the Smith predictive model is accurately matched with the actual model, the system control performance under the traditional PID, FPID and genetic algorithm optimized FPID control has little difference, and the control effect is better. When the Smith prediction model deviates from the actual model, only the FPID optimized by genetic algorithm can reach a stable state relatively quickly, and the control effect is better, which has important engineering application value.