Summary of PID Control System of Liquid Level of a Single-Capacity Tank

Liquid level is one of the control parameters widely used in industrial production. Accurate control of liquid level bears on the quality, efficiency and market of products, as well as the effect and safety of production. Therefore, the research on liquid level control has practical significance and broad application prospects. In view of this, this article firstly briefly analyzes the characteristics of the single-tank water tank level system, and then focuses on the realization of classical, fuzzy and neural network PID (Proportion Integral Differential) algorithm for the single-tank water tank level system. Finally, the validity of algorithm is proved by the system real-time simulation curve, which provides a more comprehensive reference for similar control systems.


Introduction
In the control theory, PID control is one of the mature and classical control methods, which is the organic combination of P, I and D. PID controller with its simple structure, convenient adjustment, high stability and reliability, wide range of application, strong robustness and other advantages, has become one of the main industrial control technologies. It has become the most widely used regulator in practical engineering applications [1].
In industrial process control, there are usually four types of controlled quantities: liquid level, pressure, flow and temperature. By its easiness in observation and measurement, the control method based on liquid level parameter has become a common process control strategy in current industrial production, and its impact on production cannot be ignored [2]. For the conventional liquid level control system, ordinary PID control has achieved the expected results. However, the single-tank water level control system has the characteristics of non-linearity, hysteresis, coupling, etc. Therefore, the ordinary PID algorithm is difficult to meet the application requirements in some parameter control [3]. Based on this, different PID algorithms are used to study the liquid level system in this paper, and provide ideas for the research of liquid level control through the comparison of simulation results. Analysis of dynamic water level characteristics under the disturbance of valve opening adjustment, the opening of the regulating valve is firstly fixed and then suddenly increased. As time goes by, the change of liquid level is observed, therefore, the mathematical model of liquid level can be obtained.
The change of water level at any time satisfies the following material balance equation: = * (P − Q) (1) Among them, Q = k * √H (2) P = k U (3) Among them, F represents the cross-sectional area of the water tank; k is a coefficient, usually used as a fixed constant, which depends on the valve characteristic；k is a coefficient relevant to the opening of load valve. Under the fixed opening, k can be regarded as a constant.
At a certain liquid level, considering the steady-state starting point, the formula can be converted into: Among them, C = F is water capacity，R = is water resistance. Under zero initial conditions, the Laplace change of the above equation can be obtained as follows: Among them, T = RC is the tank time constant, K = R is the process amplification factor.

Classical PID controller
Classical PID controller is one form of liner controller, containing a proportional (P), an integral (I), and a derivative term (D). The difference between the referential input (r) and the actual output (y) is used to control the output of the controlled object. The PID controller equation: u(t) = k e(t) + ∫ e(t) dt + ( ) In the equation, u(t) denotes the output of the controller; e(t) denotes the controller input, that is, e(t) = r(t) − y(t); k denotes the proportional gain, which can reflect the deviation signal e(t) of the control system proportionally. When error is generated, the controller will control and speed up the 3 adjustment to reduce difference; T denotes the integral time that can eliminate the steady-state error and improve the system's no difference degree; T denotes the derivative time, which can reflect the error signal trend and introduce a correction signal into the system before the deviation changes greatly, in order to speed up system operation and reduce the settling time to realize the advanced adjustment; T is the system sampling period.
The block diagram of classical PID controller is displayed in Figure 2. The classical PID controller compares the signal sent by the measuring transmitter with the reference input to obtain the error signal. Perform calculations with preset parameters and send the calculation results to the actuator. Finally, the actuator automatically changes the amount of material or energy flowing into the controlled object according to the signal sent by the controller, overcomes the influence of disturbance, and finally achieves the control requirements [5].

Fuzzy PID controller
Fuzzy PID controller summarizes the tuning experience and manual control strategy of the operators or experts into a fuzzy rule model. It also uses fuzzy inference to realize the PID parameters self-tuning. The block diagram of fuzzy PID controller is displayed in Figure 3. The fuzzy controller input variables are the error, e = r − y, and the error rate of change, ea = de/dt. The accurate values of the error and the error rate of change are fuzzified and then become fuzzy sum E and EA, and further the fuzzy language set of E and EA can be obtained. From the fuzzy language subsets of E and EA and the fuzzy relationship matrix, k 、k 、k are obtained by defuzzification according to the synthetic inference rules. Then they are passed to the PID controller to control the controlled object.

Neural network PID controller
Neural network PID controller applies neural network theory to PID control. The block diagram of neural network PID controller is displayed in Figure 4. The PID control method based on neural networks can adjust three control parameters of PID controller corresponding to the output parameters of neuron of training output layer through the online estimation and self-learning function of the BP neural network, so as to realize the effective control of the controlled object. Actually, the neural network PID controller acts as a feed-forward controller, and it establishes the reverse model of controlled object [6]. The neural network controller adjust itself online through the output of the traditional controller. The goal is to make feedback error e(t) approach zero so as to play a dominant role in the control.

Classical PID control simulation
When K=1 and T=5 in formula (1)(2)(3)(4)(5), Simulink toolbox is used to build the liquid level control. Simulate the system by taking unit step signal as input to set the water level. The simulation block diagram is displayed in Figure 5. When k =1, k =0.75, and k =0, the output curve of classical PID control is displayed in Figure 6.

Fuzzy PID control simulation
For the fuzzy controller, the inputs are deviation e and deviation rate ea, while the outputs are k , k and k . Set fuzzy language value of input e、ea and output k 、k 、k as {positive big、positive medium 、 positive small 、 zero 、 negative small 、 negative medium 、 negative big}, which is abbreviated as {PB、PM、PS、 Z、NS、NM、NB} [7]. The membership function of input and output variables is selected as triangle membership function.
When the system deviation e and the deviation change rate ea change, the corresponding controller parameters k , k , and k will also change. According to expert experience and manual control strategy, the control rules are as follows: When e is relatively large, in order to make system reach state steadily as soon as possible, the value of k should be larger and the value of k should be smaller. At the same time, if the value of k is too large, the system will have a huge overshoot, therefore, k =0 is generally taken. When e is medium, in order to reduce the overshoot of the system, the values of k and k should be appropriate. When e is small, in order to make system more stable, k and k should be larger. At the same time, when ea is large, in order to meet the anti-interference of the system and avoid system oscillation, k should be smaller. When ea is small, k should be bigger. The corresponding table of fuzzy control rules is displayed in Table 1 on the following page. A total of 49 (7*7) rules are designed.
Open MATLAB, input Fuzzy in the pop-up window, call up fuzzy controller, set the membership function parameters, then set the fuzzy rules, and finally check the fuzzy rules. In this paper, the Fuzzy Toolbox and Simulink toolbox in MATLAB were used to build the simulation model of the single-tank liquid level control system. Use the unit step signal as the input to set the water level to simulate the system. The simulation block diagram is displayed in Figure 7, and the output curve is displayed in Figure 8.

Neural network control simulation
Firstly, determine the structure of BP neural network, that is, the number of nodes in input layer and hidden layer, select the initial value w (0) of weighting coefficient of each layer, and designate the learning rate and the inertia coefficient. After that, k =1. Sample the given and feedback signals, named after r(k) and y(k). Then calculate the error e(k)=r(k)-y(k), which determines the input. By using Sfunction, calculate the input and output of neuron of each layer. The output layer of neural network means three adjustable parameters k ,k and k of PID controller. Based on the incremental PID control formula, the control output u(k) of PID controller is calculated to carry out neural network learning, and automatically adjust the weighted coefficient w (k) of the output and hidden layer so as to realize the adaptive adjustment of PID control parameters. Set k=k+1, and return the given and feedback signals [8].
In this paper, the NN Predictive Controller and Simulink toolbox in MATLAB are used to build the simulation model of single-tank liquid level control system. Use unit step signal as input to set the water level and the system is simulated. The simulation block diagram is displayed in Figure 9, the internal structure of the neural network is displayed in Figure 10, and the output curve is displayed in Figure 11.   Table 2 Comparison table of performance indicators   Observing Table 2, compared with classical PID control, fuzzy control and neural network control can effectively improve the system accuracy while improving the control efficiency, making the system performance indicators more superior and easier to adjust the performance index.

Qualitative comparison
The most important thing in classical PID control is parameter tuning, which showsparameters are determined according to certain rules in the established mathematical model. The algorithm has a positive control effect on a system where the error is not very large and the mathematical model is accurate. However, in many occasions, the control system is nonlinear, uncertain and diverse. Therefore, this kind of control is difficult to achieve a positive control effect. If you want to complete control of complex points, you need to further improve the algorithm.
It is difficult to extract experience in the fuzzy PID controller, and the control process doesn't have the ability of autonomous learning. The quality of the membership function of the process variables has a greater impact on the system.The neural network PID controller can not only effectively improve the accuracy and adaptive ability of the system, but also ensure that the system has better stabilityand robustness, which is suitable for nonlinear and uncertain system control [9]. The neural network PID controller is more complicated in structure, and it costs more to implement. It also has inherent

Conclusion
In this paper, several typical PID controllers based on single tank liquid level control are summarized, including classical PID and various intelligent PID algorithms derived from classical PID. These control algorithms have their own advantages and disadvantages. Due to the diversity of control objects, different control algorithms are adopted for different control environments in actual control. With the development of technology, these algorithms cannot fully meet the needs of modern industry. According to the actual situation, people need to further improve these algorithms to have a better system control effect.
At present, intelligent control has been greatly developed in both theoretical knowledge and technical control. Therefore, new control methods combining intelligent control method and conventional PID control method have been appearing and various intelligent PID control systems have emerged. It absorbs the advantages of the two methods to compensate for the shortcomings of the algorithm. Intelligent control should have the ability of self-organization, self-learning and self-adaptation,and can automatically adjust the control parameters and distinguish the controlled process parameters. It also has the advantages of conventional PID control algorithm, such as high reliability, strong robustness, simple structure and easy command by field engineers. With the two advantages, intelligent PID algorithm control becomes a very practical control method in modern control methods, such as fuzzy PID control, neural network PID control, etc.With the development of artificial intelligence, PID control algorithms will be combined with artificial intelligence for the control system. Special field artificial intelligence PID algorithm for fine adjustment. The body's own regulation is a perfect regulation system, which has been providing research data for artificial intelligence. However, this research in this area has not achieved the desired results, and will become the dominant control method in the future.