The application of neural network PID controller to control the light gasoline etherification

Light gasoline etherification technology can effectively improve the quality of gasoline, which is environmental- friendly and economical. By combining BP neural network and PID control and using BP neural network self-learning ability for online parameter tuning, this method optimizes the parameters of PID controller and applies this to the Fcc gas flow control to achieve the control of the final product- heavy oil concentration. Finally, through MATLAB simulation, it is found that the PID control based on BP neural network has better controlling effect than traditional PID control.


Introduction
With the continuous improvement of people's living standard in China, the number of cars is increasing rapidly. At the same time, a large amount of environmental pollution caused by automobile exhaust emissions has raised widespread concern. As a member of the world environmental organization, China is committing to the development of environmental protection industry. At present, China's previous gasoline product is mainly FCC gasoline (Fcc light gasoline), accounting for more than 80% of all. Therefore, the FCC light gasoline etherification process has become one of the important means to reduce the olefin content of gasoline and to improve the octane number of gasoline in china's petroleum processing industry [6] . C6 and a small amount of C7 light fraction was separated from Fcc gasoline through distillation tower, then hydrogen cracked those tertiary olefins and the resultants are reacting with methanol and producing ether at last, which is the entire progress of light gasoline etherification [5] . The etherification process flow diagram is shown in figure 1:

FCC heavy gasoline concentration control principle
In the control system of FCC gasoline concentration, the principle of the control system based on the pipeline valve as the actuator is shown in figure 2. For the PID controller, in order to get ideal control effect, three parameters: the proportional coefficient (Kp) differential (Ti) differential time (Td) must be optimized firstly. This paper integrates the PID control law into BP neural network, neutralizing the two methods to realize the essence of the two fusion and overcoming the shortcomings of this method to some degrees.  Fig. 2 Control principle of the heavy gasoline concentration N 0 and N is the heavy oil concentration given value and the actual output value;  and  is FCC gasoline velocity given value and output value respectively; e is the deviation of  and  ; u is the PID controller output. In each sampling interval, the system receives a control function u, which can control the opening of the pipeline valve in real time. The control algorithm dealing with the valve control system makes the intensity of pulse corresponding to angle of the valve during the sampling period under the response of multi-pulse. At this time, the response of the system to the impulse is a multi-step process.The transfer function is: The K is the gain of the transfer function's integration loop in heavy oil concentration control system, which is in the inverse proportion to the sampling period.

PID tuning based on BP neural network
In order to achieve good control effect of pipeline valve opening using PID control, 3 kinds of control functions: proportion, integral and differential must be adjusted, forming coordinating and restricted relationship of control. As a result, the key to pipeline valve opening degree control is to find the best combination. The neural network has the ability of nonlinear mapping, which can realize the best combination of PID control by learning the system performance. BP neural network can be used to build parameters Kp, Ki, Kd self-tuning PID controller.

PID control system structure
In this paper, a kind of online training method is used, and the neural network is used to learn online continuously in real-time examination, and through its own learning, we can find the PID parameters under a certain optimal control. BP neural network PID control system structure is shown in figure 3: The control system structure of BP neural network is composed of two parts: PID controller, the function of which is direct closed loop control of the controlled object, three of which are online tuning; NN, according to the operation state of the system, adjust the parameters of PID controller, to achieve the optimization of some performance index. The outputs of neural network correspond to three adjustable parameters of the PID controller [4] . Through self-learning and adjusting the weights of the neural network, it corresponds to the optimal PID controller parameters when the control of the state is stable. Then, the adjusting of network weight is to adjust the parameters of BP neural network on PID, forming a closed loop control system.

PID control algorithm
Incremental digital PID control algorithm: Type K, K -1, K -2 are the three adjacent moments. When calculating the error or lack of precision, the incremental digital PID control algorithm has the advantages of minimal influence of control calculation, while location algorithm's each output is related to entire past state, using the past calculation deviation to the accumulated value, which is prone to bigger error accumulation [3] .

BP neural network model
The BP neural network is a one way propagation of multi-layer feed forward neural network, which can be regarded as the height from the input to the output nonlinear mapping. BP neural network is composed of three or more than three layers of the network. In addition to the input and output nodes, the network contains one or more hidden layers, without influence between the nodes in the same layer [8] . The output nodes of each layer will only affect the next layer of nodes, which are used as the activation function of Sigmoid function. The typical structure is shown in figure 4: are the outputs of the output layer, they match with Kp, Ki and Kd, then the NN-PID controller is designed to make the following function minimal [1] : According to the gradient descent method, the weights of the network are modified, which means that E (k) is used to search for the negative gradient direction of the weighting coefficient, and a search term is used to search for the fast convergence of the global minimal function: In the formula,  is the learning rate;  is the inertia coefficient.
with function approximation, the calculation of the influence of imprecise can adjust the learning rate  to compensation. The above analysis can lead to the algorithm for network layer power output:

(
The learning algorithm of the hidden layer weighted can also be led to: (2) To determine the learning rate  and inertia coefficient  , k=1 [ (4) To calculate the input and output of each layer of the neural network, the output of the output layer is the PID controller of the 3 parameters Kp, Ki, Kd;

Neural network PID parameter tuning control algorithm
(5) The output U (k) of the PID controller calculated by the incremental digital PID control algorithm; (6) The neural network learning, online adjustment of the network weight coefficient and threshold coefficient, to achieve adaptive adjustment of PID control parameters; (7) To change the K value to k+1, and then restart the second step.Cycle adjustment.

The results of simulation
According to the theory and technology of etherification of light FCC gasoline, considering the system without disturbance, the simplified transfer function for heavy oil concentration is:

(
Referring to the literature [ Using MATLAB to do traditional PID simulation, setting the given input set  for the heavy oil concentration as unit step function, the simulation curve is shown in Figure 5:

Conclusions
Observing the above simulation curve, we can conclude that: compared with the traditional PID neural network PID control process has advantages of smaller overshoot, more rapid adjustment and shorter adjustment time, meaning that the control performance is better; then its steady-state error is smaller than that of traditional PID control; in addition, PID parameter can adjust automatically and the results simulation show that the method can improve the control performance of heavy oil concentration.
Relying on self-learning and self-organizing ability of neural network, PID neural network control algorithm can realize on-line self-tuning and optimize PID parameters, avoiding the tedious manual tuning of PID parameters; heavy oil concentration control system of neural network for adjusting PID parameters has faster response and better robustness, reducing the influence of outside interference and delay on the performance of the control system. Therefore, the neural network PID control compared to the traditional PID control has better effect on the concentration of heavy oil light gasoline etherification process, which has far-reaching significance to improve the stability of the product.