Design of extended Kalman filtering neural network control system based on particle swarm identification of nonlinear U-model

This paper studies the modelling of a class of nonlinear plants with known structures but unknown parameters and proposes a general nonlinear U-model expression. The particle swarm optimization algorithm is used to identify the time-varying parameters of the nonlinear U-model online, which solves the identification problem of the nonlinear U-model system. Newton iterative algorithm is used for nonlinear model transformation. Extended Kalman filter (EKF) is used as the learning algorithm of radial basis function (RBF) neural network to solve the interference problem in a nonlinear system. After determining the number of network nodes in the neural network, EKF can simultaneously determine the network threshold and weight matrix, use the online learning ability of the neural network, adjust the network parameters, make the system output track the ideal output, and improve the convergence speed and anti-noise capability of the system. Finally, simulation examples are used to verify the identification effect of the particle swarm identification algorithm based on the U-model and the effectiveness of the extended Kalman filtering neural network control system based on particle swarm identification.


Nomenclature y(t)
the actual output of the nonlinear controlled plant M the order of the nonlinear controlled plant α j (t) the time-varying coefficient of the controlled plant of the nonlinear system u(t- 1) the control input of the nonlinear controlled plant e(t) the error caused by uncertainty factors of nonlinear system x i the position vector of the i-th particle v i the velocity vector of the i-th particle p i the individual extreme value of the population p g the global extreme value of the population ω the search step of the population c 1 /c 2 the learning rates of the population r 1 /r 2 mutually opposite pseudo-random numbers m Number of particle swarm populations n Search dimensions for each particle k the number of iterations U(t) the controller output of the nonlinear Umodel system and is also the input of newton iterative algorithm θ the state parameter W the weight parameters parameters of the neural network V the threshold parameters of the neural network l the number of hidden nodes in the neural network (t) the control interference g(θ(t)) the actual output of the RBF network

Introduction
In the actual production process, nonlinear characteristics are ubiquitous, especially with the rapid development of large machinery informatization, intelligence, and integration; the research of nonlinear systems has become particularly important. With the deepening of the study on the nonlinear theory, researchers have achieved good results, and many nonlinear research results have been applied to actual production. At the same time, due to the continuous improvement of the production process and the higher precision of the process demands, the nonlinear characteristics also show an increasingly complex trend. However, the design of a nonlinear control system with good performance requires a precise nonlinear model. The nonlinear system's increasing complexity limits the production process's precision to a certain extent, which prompts more researchers to study the model and control problems of the nonlinear system. Due to the ubiquity of nonlinear characteristics and the inherent complexity of nonlinear time-varying systems, it isn't easy to establish a general and high-precision mathematical model, which is also the premise and foundation for designing a nonlinear control system. A nonlinear U-model is proposed based on the nonlinear autoregressive moving average model [1,2]. In [3], a dynamic inversion algorithm of the U model was designed based on the U model of continuous-time (CT) system described by polynomials and state space. When using U-model to represent the nonlinear model, there is no loss of model accuracy, which improves the accuracy of nonlinear plant modelling. For complex nonlinear systems, there are many factors that affect the modelling, which leads to a large difference between the ideal model of the system and the actual model. Therefore, model identification becomes a method to improve the modelling accuracy.
In [4], the least square method was used to identify the U-model coefficients of stochastic nonlinear plant, and the radial basis neural network was used as the controller. Considering that the number of U-model coefficients of random plant is known, a minimum performance index was proposed, and a variable learning operator was constructed by using the least mean square deviation method to update the coefficients of U-model and the weights of radial basis neural network. Assuming that all parameters of the U-model were completely unknown, the unknown plant was identified by the weighted iterative least square method using the U-model framework, the time-varying coefficients of the proposed U-model expression were identified, and the convergence of online identification of time-varying parameters was proved [5]. In [6], the U-model was used to express the unknown MIMO bilinear system model, and the radial basis function neural network was used to identify the MIMO bilinear plant model online. In [7], a coupling multivariable underactuated nonlinear adaptive U-model control method is designed. In [8][9][10][11][12][13][14][15][16][17], for the nonlinear plant with an unknown model structure, the neural network model was used to approximate the nonlinear plant, and the structure of the plant is identified online using the adaptive filter. In [18], a U-model-based two-DOF internal model control (UTDF-IMC) structure is proposed to accommodate modelling errors and disturbances while eliminating linearization techniques widely used in nonlinear models. Other identification methods of nonlinear plant based on U model are still worth exploring.
The neural network has good generalization ability, and the network structure is simple, which can avoid complex mathematical calculations. Research on the function approximation capability of RBF neural networks shows that RBF neural networks can approach any nonlinear function with any precision. Therefore, RBF neural network has attracted much attention in nonlinear control research, and some research results have been obtained. With the known order of nonlinear U-model plant, Chang et al. [19] used the least-squares algorithm to identify unknown parameters of nonlinear U-model plant and designed a radial basis function neural network (RBFNN) online controller. In [20], based on a pole placement PID controller designed, a composite control method of RBF and PD was proposed for the tracking control of nonlinear dynamic systems. The proposed scheme combined the stability of PD and the ability of the RBF to approximate any function with any precision and combined the controloriented nature of the U-model to achieve accurate tracking of nonlinear plants. In order to control the pitch angle of wind turbine blades in the rated power area, the controller of the RBF network was proposed in [21]. Aiming at the stability problem of nonlinear systems, a neural fuzzy hybrid controller based on radial basis function network (HNFRBFN) was proposed in [22]. The paper [23] proposed a model reference adaptive speed controller based on an artificial neural network for induction motor drives, where RBF is utilized to compensate for the unknown nonlinearity in the control system adaptively. In [24], an adaptive algorithm of radial basis function neural network is designed. By automatically updating the weights and network parameters and adjusting the adaptive controller, the output of the controlled nonlinear object can be completely tracked to the ideal output. These control methods used traditional gradient descent backpropagation learning algorithms for network training. In the learning algorithm based on the gradient descent method, the neural network weights were updated in the negative gradient of the error cost function to achieve the global minimum. Although the design process of this method was simple, it made the network easy to fall into local minimum value and slow convergence speed [25]. In order to solve this problem, some improved methods were proposed, including modified learning rates and momentum factors [26]. In [27], a universal U neural network structure is proposed to facilitate the design and control of all dynamic systems modelled by nonlinear polynomial equations. But in many cases, these improved methods add computational complexity. When there is noise interference in the control system, it will reduce the network's learning ability. Therefore, this paper uses the extended Kalman filtering algorithm to improve the neural network learning algorithm.
In the case of slow time variation, due to the multi-objective optimization ability of particle swarm optimization algorithm and its fast convergence ability, for the nonlinear plants with known structure and unknown parameters, this paper uses the particle swarm identification algorithm to identify the timevarying parameters of the U-model online and solve the identification problem of nonlinear U-model system. Considering the influence of control interference on the system, in order to improve the learning ability of the neural network, an extended Kalman filter neural network control system is proposed. The extended Kalman filtering algorithm is used as the learning algorithm of the RBF neural network, and the weights and parameters of the neural network algorithm are adjusted online to complete the design of the nonlinear control system.
The rest of this article is organized as follows. The second section mainly discusses the establishment of the nonlinear U model and the basic knowledge of particle swarm optimization algorithm. In Section 3, the overall structure of the nonlinear U model control system is studied. In Section 4, the online identification of time-varying parameters of the U model is presented. In Section 5, the U model is transformed. In Section 6, we discuss using EKFRBF to deal with models that do not match Newtonian iterations. In Section 7, we simulate the optimized U model. Finally, the thesis is summarized.

Nonlinear U-model
In 2002, the concept of nonlinear U-model was proposed in [2]. It establishes a general mapping, which can represent a large class of nonlinear controlled plants. Its expression is as follows: In Eqaution (1), y(t) represents the actual output of the nonlinear controlled plant, M represents the order of the nonlinear controlled plant, α j (t) represents the time-varying coefficient of the controlled plant of the nonlinear system, which is a function of y(t − 1), y(t − 2),· · · ,y(t − n), u(t − 2),· · · ,u(t − n) and e(t − 1), e(t − 2),· · · , e(t − n). u(t − 1) represents the control input of the nonlinear controlled plant. e(t) represents the error caused by uncertainty factors of nonlinear system, such as modelling error and external interference.

Particle swarm optimization algorithm
Particle swarm optimization is a swarm intelligence optimization algorithm based on biological population simulation. It has the characteristics of simple structure and easy implementation. The particle swarm optimization algorithm expresses each possible solution as a particle in the population. Each particle has a corresponding position vector and velocity vector. The fitness of each particle is determined according to the plantive function. The optimal global value is found by updating the current optimal value. Assume in an n-dimensional search space. In a population of m particles of an n-dimensional search space, where the position vector of the i-th particle is , and the global extreme value is p g = (p g1 , p g2 , · · ·, p gn ), the updated formula of the individual position vector and velocity vector of the population is as follows: where, ω represents the search step of the population, c 1 and c 2 represent the learning rates of the population, r 1 and r 2 are mutually opposite pseudo-random numbers, subject to the uniform distribution on the interval [0,1], υ ∈ [−υ max , υ max ], and υ max is the normal number. The initial position vector x k id and velocity vector υ k id of each particle is updated according to the current individual velocity, memory, and population influence of each particle, the current optimal position and global optimal position of each particle, and the position vector and velocity vector of each particle at the next moment are updated.
In summary, the updating method of particle position is shown in Figure 1.

Control structure of nonlinear U-model
The nonlinear control system based on U-model is designed. Particle swarm optimization algorithm is used to identify time varying parameters of nonlinear U-model. The model transformation is completed by newton iteration algorithm. The neural network is used as the controller of the nonlinear U-model system. The extended Kalman filtering algorithm is used to optimize the neural network controller to ensure the stability of the system and improve the disturbance rejection performance of the system. The extended Kalman filtering neural network control system based on particle swarm identification is shown in Figure 2.
When the input error exists due to various factors, a particle swarm optimization algorithm is used to find the optimal time-varying parameters to reduce  the error. The particle swarm optimization algorithm needs to update the nonlinear object model to complete the system control, so it has certain limitations on the tracking speed of the nonlinear system based on the U-model, which leads to a certain tracking error of the system. Therefore, Newton iterative algorithm is used to transform the nonlinear U-model. There may be a deviation between U-model and Newton iterative algorithm. The output of the controlled object is adaptively tracked to the expected output of the nonlinear U-model by EKFRBF neural network.

Particle swarm algorithm identification
Since the particle swarm optimization algorithm has multi-plantive optimization and fast convergence, the particle swarm optimization algorithm can be used to identify the time-varying parameters of the nonlinear U-model, and the i-th time-varying parameter in the Umodel is regarded as the i-th particle in the population. The structure is shown in Figure 3.
The specific steps of identifying the time-varying parameters of U-model by particle swarm optimization algorithm are as follows: (1) Establish a population of m particles, initialize the position vector and velocity vector of each particle; (2) The position vector of each particle is taken as the time-varying parameter of the U-model, and then the fitness value of each particle is calculated according to the fitness formula fitness = 1 2 e 2 (t); (3) Update the current optimal position p i and global optimal position p g of each particle; (4) Update the position vector and velocity vector of each particle according to (2); (5) Determine whether the number of iterations reaches the set value, and if the termination condition is met, the algorithm is terminated; Otherwise, return step (2).
In summary, the process of using the particle swarm optimization algorithm to identify the time-varying parameters of the U-model is shown in Figure 4.

Nonlinear model transformation
Newton iterative algorithm can be used to solve the polynomial (1), which provides a transformation method for the nonlinear U-model, and can improve the response speed and control accuracy of the nonlinear system. The output of the newton iteration formula is u(t − 1). The newton iteration formula can be described as: In Equation (3), k is the number of iterations, the iteration of k + 1 times is obtained from k iterations, k ≥ 0. U(t) represents the controller output of the nonlinear U-model system and is also the input of newton iterative algorithm. The input of nonlinear U-model plant can be calculated by newton iterative algorithm (3).  Newton iterative algorithm is used to transform the nonlinear U-model, and its transformation structure is shown in Figure 5.
It can be seen from Equations (1) and (3) that the newton iteration formula and the U-model are inverse functions of each other. When the iterative algorithm is completely inversed with the U-model, the model transformation of system is matched, which is equivalent to cancelling the nonlinear part, y(t) = U(t), and the system output can completely track the input; When the iterative algorithm is not completely inversed with the U-model or the calculation order of the iterative algorithm is limited, the system model transformation has deviation. In the actual nonlinear system, the Umodel cannot completely describe the nonlinear plant completely. And it is difficult to completely match the U-model with the newton iteration formula. Therefore, it is necessary to design the controller to complete the control requirements.

Design of EKFRBF network control system
The extended Kalman filtering algorithm is used as the learning algorithm of neural network to optimize the neural weights and threshold parameters. The state space equation obtained by combining RBF neural network with extended Kalman filtering expression is as follows: In Equation (4), θ = W V T is the state parameter, W and V are the weight parameters and threshold parameters of the neural network, respectively.
. l is the number of hidden nodes in the neural network.
(t) is the control interference, which is white noise with constant variance. g(θ (t)) is the actual output of the RBF network. U(t) is the output of the RBF neural network controller with disturbance, and is also the input of newton iterative algorithm.
The hidden layer output of the RBF network is: In Equation (5), γ and p are constants, H = h 1 (t) · · · h j (t) · · · h l (t) .
The output of the RBF neural network controller, ie the input of the newton iteration algorithm, is: The partial derivative of U(t) is: where, The Kalman gain is: The error covariance matrix: The update algorithm of neural network weights and threshold parameters is: The neural network is trained by the extended Kalman filtering algorithm, and the network parameters are adjusted. The controlled plant output is adaptively tracked on the desired output of the nonlinear U-model system.

Simulation
Through two nonlinear plants, the identification effect of particle swarm identification algorithm on nonlinear U-model plants is verified first, and then the validity of extended Kalman filtering neural network control system based on particle swarm identification is verified when the nonlinear U-model system has control interference.

Simulation of particle swarm identification
The laboratory liquid level system and continuous stirred tank reactor were selected as nonlinear plants to verify the effectiveness of particle swarm optimization algorithm in identifying nonlinear U-model.
Particle swarm optimization algorithm parameters [28]: m = 20, n = 1, ω = 0.5, c 1 = c 2 = 1, The initialization values of position vector and velocity vector are random numbers, both of which follow normal distribution, and the maximum number of cycles is 30.
Simulation 1: the U-model of the laboratory level system is as follows: The triangular and sinusoidal waves are selected as input signals for simulation, and the simulation results of identifying unknown nonlinear U-model plant using   Simulation 2: the U-model of the continuous stirred tank reactor can be expressed as:  where, The triangular and sinusoidal waves are selected as input signals for simulation, and the simulation results of identifying unknown nonlinear U-model plant using particle swarm optimization algorithm are shown in Figures 10-13.
The relation between the iterative relation of particle swarm and fitness function is shown in Figure 14: It can be seen from the output graph of particle group identification that when the triangular wave and the sinusoidal wave are used as inputs, the output of particle swarm identification algorithm can track the output of  the nonlinear U-model plant well; As can be seen from the error graph of particle swarm identification, particle swarm algorithm has little error in identifying nonlinear U model objects, and the identification accuracy is relatively high.

Simulation of neural network control system
Laboratory level system and continuous stirred tank reactor are used as nonlinear controlled plants to verify the effectiveness of extended Kalman filtering neural network control system based on particle swarm identification.
The structure of RBF neural network adopts 1-7-1, 90% of the dataset as a training set, 10% as a test set and the initial values of neural network weights and threshold parameters are all 0. Q = 0.1, γ = 1, p = 3 [26]. Particle swarm optimization algorithm parameters: m = 20, n = 1, ω = 0.5, c 1 = c 2 = 1, The initialization values of position vector and velocity vector are random Numbers, both of which follow normal distribution, and the maximum number of cycles is 30.  The control interference (t) is a random interference signal with an amplitude of 0.01. Simulation 1: The U-model expression of the laboratory level system is:  Under the influence of disturbance, the input signal selects the triangle wave and the sine wave respectively for simulation. The simulation results of the system output and system response error are shown in Figures  15-18. Figures 15 and 17 are system output responses, and Figures 16 and 18 are system response errors.
Simulation 2: the U-model of the continuous stirred tank reactor can be expressed as:   Under the influence of disturbance, the input signal selects the triangle wave and the sine wave respectively for simulation. The simulation results of the system output and system response error are shown in Figures  19-22. Figures 19 and 21 are system output responses, and Figures 20 and 22 are system response errors.
It can be seen from the simulation results that the extended Kalman filtering neural network control system based on particle swarm identification can track the expected output well in the presence of control interference. Compared with the gradient descent method, the extended Kalman filtering algorithm is used as the learning algorithm of the RBF neural network, which makes the system have a better control effect, faster response speed, smaller response error, and smoother output. In addition, when the system starts to respond, the response error has no obvious jump change, which can reduce the unnecessary wear and tear of the controlled device and prolong the device's service life. The simulation results show   that the proposed algorithm improves the convergence speed and anti-noise capability compared with the gradient descent method.

Conclusions
In this paper, the U model framework is directly used to establish the nonlinear model through online identification under slow time variation. For the nonlinear U-model plant with known structures but unknown parameters, a particle swarm optimization algorithm is used to identify the time-varying parameters of the nonlinear U-model, and a better identification result is obtained. The identification error is small, and the accuracy is high. The newton iterative algorithm is introduced to transform the nonlinear plant model. The extended Kalman filtering neural network control based on particle swarm identification is proposed as the control scheme of the nonlinear U-model system. Considering that the interference in the nonlinear system will lead to the decline of network learning ability, the extended Kalman filtering algorithm is introduced in the learning of RBF neural network to reduce the influence of the disturbance on the stability and accuracy of the system, improve the control effect and the anti-interference of the system, and realize the accurate control of the complex nonlinear system.