Abstract
The temperature system of the Continuous Stirred Tank Reactor (CSTR) has the characteristics of strong nonlinearity and uncertain parameters. The linear PID controller makes it difficult to meet CSTR’s control requirements. Nonlinear PID (NPID) can improve the control effect of nonlinear controlled objects, but due to the influence of nonlinear function selection and manual parameter setting, when parameters are uncertain or subject to external interference, the control performance of the system will decrease. To improve the adaptive capability of the NPID controller, the RBF-NPID control algorithm is proposed. The learning ability of RBF neural network is used to adjust NPID parameters online to improve the control performance of the system. In order to verify the effectiveness of the proposed algorithm, a CSTR model was established in MATLAB and algorithm comparison research was carried out. Simulation results show the effectiveness and superiority of the proposed algorithm.
Introduction
CSTR is one of the main equipment for the production of chemical products. In the production process, the control of the CSTR system will directly affect the quality and production efficiency of chemical products. CSTR equipment is affected by internal and external environmental factors, such as raw material purity, reactant mixing, reactor temperature, reaction residence time, and catalyst. The reaction process often has a high degree of nonlinearity and parameter uncertainty.1,2
PID controller has been widely used in engineering because of its simple structure and few parameters, which can be adjusted by experience and formula method, and its control process does not depend on the accurate mathematical model of the system. 3 However, for nonlinear systems with parameter uncertainties such as CSTR, the traditional PID controller is difficult to meet the control requirements of the CSTR process. 4
In recent years, the control algorithm combining nonlinear control and PID control has been used in system control.5,6 NPID combines PID control with nonlinear control strategy, which not only inherits the simple structure of linear PID algorithm, but also shows good control performance in nonlinear system control, making it one of the simplest and most effective control methods in many control algorithms. 7 However, one of the main problems of the NPID controller is that control performance is affected by factors such as nonlinear function selection and manual parameter tuning. When the system is uncertain, it is difficult to ensure the optimal effect.8,9
In order to solve the limitations of manual tuning parameters of conventional PID control algorithms, more and more artificial intelligence algorithms have been proposed to optimize PID parameters, such as swarm intelligence algorithms, 10 fuzzy rules, 11 and neural networks. Among them, RBF neural network has good generalization ability and simple network structure. It can not only approximate any continuous nonlinear function with any precision, but also has the characteristics of fast convergence speed and strong local approximation ability, which has attracted the attention of scholars. Gao et al. 12 combined RBF neural network with PID control and applied it to inverted pendulum system. The results show that compared with other methods, the overshoot of the tracking signal is further reduced and the response speed is further improved. Xiao et al. 13 updated its parameters via the error signal between the RBF network output and the system output. PID parameters are updated by Jacobian matrix and system motion error. Experiments show that the RBF-PID controller is superior to the traditional PID controller in response speed, anti-interference and tracking. Zhou et al. 14 used the powerful learning ability of the RBF neural network to adjust PID parameters online, which can not only eliminate overshoot, but also improve the adaptability of the controller. In addition, the control of other types of PID is studied by using the characteristics of RBF neural network. Asgharnia et al. 15 used RBF neural network to select the parameters of the proposed gain-scheduled fractional-order PID method to optimize the gain-scheduled fractional-order PID at multiple wind speeds. Simulation results show the superiority of the proposed method. Gao and Xiong 16 designed a control strategy combining RBF neural network supervisory control and expert PID control to ensure the stability of the motor load system and improve the performance of the system.
Inspired by the above literature, the RBF neural network is used to optimize the control parameters of the NPID algorithm, and the RBF-NPID control algorithm is proposed. This method inherits the advantages of NPID controller, such as simple structure and suitable for nonlinear systems, and can adaptively adjust the parameters of NPID controller according to the change of controlled object. The proposed algorithm is applied to the design of the CSTR system, and the basic PID tuning method and RBF-PID neural network tuning technology are comprehensively studied.
The structure of this study is as follows: Section 2 introduces the CSTR model. Section 3 describes the design of NPID controller based on RBF optimization. Finally, Section 4 discusses the results obtained from the proposed control strategy. The last part briefly introduces the conclusion of the research work.
CSTR model
As a chemical reactor, CSTR must accurately control the temperature change of the material reaction. However, the chemical reaction mechanism in the system is complex and has a strong exothermic effect, which makes the reaction process of the system have strong nonlinearity and parameter uncertainty, and it is difficult to control the system. A class of nonlinear CSTR is studied, and its structure is shown in Figure 1. 17

CSTR temperature control system.
According to the material balance and energy balance in the reaction process, the CSTR model is as follows 17 :
The definition of the corresponding parameters is shown in Table 1.
Meaning of CSTR object parameters.
For further analysis, synthesis and design, the dimensionless parameter description of the system is introduced. 18 The dimensionless model is shown in (2), where the parameters and variables are shown in Table 2.
Dimensionless parameters of CSTR.
RBF-NPID control algorithm design
The structure of NPID controller
The traditional PID controller is a linear controller, which cannot adjust the nonlinear factors in real time, and it is difficult to further improve the control performance. Therefore, when the traditional PID controller is applied to systems with nonlinear factors, its control performance will decrease. The nonlinear transformation of the control parameters in the NPID controller ensures that the control parameters can change in real time according to the error
Specific parameters for proportional gain coefficient
wherein parameters
RBF neural network
Artificial neural network (ANN) is an artificial intelligence system that mimics biological neural network (BNN). 19 It uses nonlinear processing units to simulate biological neurons, and simulates the biological synaptic behavior between neurons by adjusting the variable weights between the connection units.
RBF is a feedforward network based on function approximation theory. It has a strong local approximation ability and can guarantee that the network can approximate any type of nonlinear function with any precision. 20 The structure diagram of RBF neural network consists of three layers of neural network, input layer, hidden layer, and output layer. The mapping from input to output of the network is nonlinear, while the mapping from hidden layer space to output space is linear. That is, the output of the network is the linear weighted sum of the output of the hidden unit. The weight here is the adjustable parameter of the network, and the selection of the weight has an effect on the learning speed and the local optimal solution. 21
In the RBF network structure of Figure 2, the vector
where

RBF neural network structure diagram.
The output of RBF network is expressed as:
the weight
Update the output weight
Update the hidden layer node center
Update the base width parameter
where
where
RBF-NPID control algorithm
The structure of the NPID algorithm based on the RBF neural network is shown in Figure 3. RBF neural network will adaptively calculate the weight coefficient and parameter gradient information according to the operating state of the reactor control system. These results will be used to update NPID controller parameters in real time. This repeated process allows adaptive adjustment of NPID parameters and enhances reaction temperature control.

RBF-NPID controller structure diagram.
The algorithm uses an incremental PID controller, so the control error is defined as follows:
where
According to the derivation process and expression form of incremental PID, the expression of incremental NPID controller can be obtained as follows:
where,
where
RBF neural network output performance index function
According to the gradient descent method, the three parameters of the NPID controller are adjusted adaptively. Adjusted parameters are shown as follows:
where
RBF-NPID control algorithm flow
The algorithm flow of the RBF-NPID algorithm is shown in Figure 4, and the implementation steps are as follows.
Step 1: Initialize network parameters, including the number of nodes in the input layer and the hidden layer, center vector, base width vector.
Step 2: The system input
Step 3: Output
Step 4: The network output
Step 5: The controller parameters are adjusted according to equation (15).
Step 6: If the condition is satisfied, terminate the algorithm. Otherwise, return to the second step and repeat the following steps.

RBF-NPID algorithm flow chart.
Simulation analysis
First, considering the fixed parameters, the values of each parameter in equation (2) are taken as
In order to evaluate the controller performance, the overshoot, settling time and time weighted integral absolute error (ITAE) are used as the performance indexes of the algorithms. The ITAE mathematical expression is as follows:
Tracking performance analysis
Taking the step signal as the control signal, the CSTR discharge temperature response curves under RBF-NPID, NPID and linear PID algorithms are compared and analyzed. The initial parameters of the PID controller are obtained by the engineering tuning method, and further adjusted to obtain the ideal PID controller parameters Kp = 24, Ki = 18, Kd = 0.92. Similarly, by observing the step response curve and repeatedly adjusting it manually, the initial parameter of the NPID controller is set to ap = 30, bp = 25, cp = 30, ai = 45, bi = 0.3, ad = 0.388, bd = 0.5, cd = 0.01, dd = 0.09. For the RBF neural network model, first select an appropriate number of neurons in the hidden layer based on experience, and then determine the number based on simulation performance. Finally, the network structure adopts a 3-8-1 structure. The parameter setting values are

Discharge temperature tracking response curves.
Mean value of discharge temperature tracking response performance indexes.
From the curves in Figure 5, it can be seen that with constant parameters, the three algorithms can stabilize the response curves to the set value and achieve a good control effect on the system. According to the data in Table 3, the overshoot of the RBF-NPID algorithm is minimal, and the setting time and ITAE are between PID and NPID. Overall, the NPID algorithm’s performance index, which has undergone repeated manual parameter tuning, is the best.
However, due to various internal and external environmental factors, the actual CSTR parameters are usually uncertain. The control performance of the system under the condition of parameter changes and external disturbances is discussed in detail in the following sections.
Robustness analysis
In order to verify the control performance of the system after the parameters change, the parameters Da, b, and β which have great influence on the CSTR system are selected to change by 25% and 50%, respectively. The changed parameters are shown in Table 4.
1) Da, b, and β change by 25%, respectively. The temperature tracking response curves of CSTR is shown in Figure 6, and the corresponding performance indexes are shown in Table 5.
Parameters after model changes.

Discharge temperature tracking response curves when parameters change by 25%.
Mean value of tracking response curve performance indexes when parameters change by 25%.
It can be seen from Table 5 that the overshoot, settling time and ITAE of the RBF-NPID algorithm are the smallest.
2) Da, b, and β change by 50%, respectively. The temperature tracking response curves of CSTR is shown in Figure 7, and the corresponding performance indexes are shown in Table 6.

Discharge temperature tracking response curves when parameters change by 50%.
Mean value of tracking response curve performance indexes when parameters change by 50%.
The results show that the overshoot, settling time and ITAE values of Table 6 under the three algorithms are larger than those of Table 5, indicating that the performance of the control system becomes worse when the parameter change rate increases. But the performance index of RBF-NPID algorithm is still the smallest.
3) Da, b, β randomly increasing or decreasing by −50% to 50%, the CSTR discharge temperature tracking response curves as shown in Figure 8, and the corresponding performance indexes are shown in Table 7.

Discharge temperature tracking response curves when parameters change randomly.
Mean value of tracking response curve performance indexes when parameters change randomly.
The results show that the overshoot, settling time and ITAE of RBF-NPID algorithm are still the smallest when the parameters change randomly. Therefore, RBF-NPID is more robust than the other two algorithms.
Anti-interference analysis
1) In order to verify the anti-interference of the proposed algorithm, step disturbance is first applied at positions F1 and F2 when the parameters are fixed, as shown in Figure 9. At the F1 position for 4, 10, 16, and 22 s, a step disturbance with an amplitude of 1.5 is applied as shown in Figure 10, and the corresponding performance indexes are shown in Table 8. At the F2 position for 4, 10, 16, and 22 s, a step disturbance with an amplitude of 0.3 is applied as shown in Figure 11, and the corresponding performance indicators are shown in Table 9.

The disturbance position of the system.

F1 interference response curve with fixed parameters.
Mean value of performance indexes for F1 interference response curves.

F2 interference response curve with fixed parameters.
Mean value of performance indexes for F2 interference response curves.
The results show that when the parameters are constant, the overshoot, settling time and ITAE of RBF-NPID algorithm are the smallest under interference F1 and F2, respectively.
2) When parameters change randomly, the F1 interference response curves are shown in Figure 12, and the corresponding performance indexes are shown in Table 10. The F2 interference response curves are shown in Figure 13, and the corresponding performance indexes are shown in Table 11.

F1 interference response curve with random parameter changes.
Mean value of performance indexes for F1 interference response curves with random parameters.

F2 interference response curve with random parameter changes.
Mean value of performance indexes for F2 interference response curves with random parameters.
The results show that the overshoot, settling time and ITAE of RBF-NPID algorithm are still the smallest when the parameters change randomly, indicating that the algorithm has the strongest anti-interference ability.
Conclusion
In this manuscript, a class of nonlinear CSTR is studied by MATLAB simulation. The object has high nonlinearity and parameter uncertainty, and the linear PID control algorithm cannot meet the control requirements of the CSTR system. Therefore, the RBF-NPID algorithm is proposed, which uses the RBF neural network to adjust the parameters of the NPID controller to improve the adaptive ability of the controller, and thus improve the control performance of the system. The RBF-NPID algorithm is compared with PID and NPID algorithms for the same process. From the results, it is determined that the performance indexes of the proposed algorithm are optimal when the parameters of the CSTR system change significantly or are subject to external disturbances. Therefore, the RBF-NPID algorithm effectively improves the robustness and anti-interference capability of the system.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research is supported by the Scientific Research Fund of Guilin University of Technology (GLUTQD2012033).
