2017 3rd International Symposium on Mechatronics and Industrial Informatics (ISMII 2017) ISBN: 978-1-60595-501-8 Design of Liquid Level Control System Based on Simulink and PLC Xiuwei FU 1,a, Ying QI 2,b and Li FU 1,c 1 College of Information & Control Engineering, Jilin Institute of Chemical Technology, Jilin 132022, China 2 School of Electronic Engineering and Automation, Guilin University of Electronic Technology, Guilin 541004, China a fxw7720268@163.com, b 1049559490@qq.com, c fuli247012412@126.com Keywords: Double-water tank, SIMULINK. WinCC. Abstract. Double-water tank is simulated by using hardware-in-loop simulation platform in this design. Semi-physical simulation is realized by the computer, SIMULINK and using QuaRC. On this basis, the monitoring operating of double-water tank can be realized by PLC. First the controlled object is analyzed the model to build the physics model on SIMULINK, communicate with PLC by means of data sampling module and monitor the change of liquid level by WinCC configuration software, design and build remote computer process control system, complete control system experiment result analysis. 1. Introduction Liquid level control, which is an important research model of process control, has significant theory and practical significance for the study of the liquid level control system. And generate lots of empirical parameter by the theory study, which can be applied or promoted in other design controls. Currently, double-water tank level control system is studied by generally using pure digital simulation method. Some factors are idealized or ignored in the computer. Therefore, the simulation method of using hardware in loop is the real-time simulation that is connected with the material object in the simulation experiment system. The hardware in the loop simulation is more reliable than other types simulation methods. The hardware in the loop simulation system has better real-time and get closer to the actual running state. And the main advantage of the hardware in loop simulation is that the simulation results are intuitive. So in some industrial process, the product development cycle can be greatly shorten and the efficiency can be improved by using the strategy of the hardware in the loop simulation[1-2]. This paper, which based on the double-tank liquid level process control system of real-time simulation platform as the object of study, introduced its hardware constitution, system modeling, and analyzed and researched control scheme and control algorithm. With the help of PLC, the design requirements of the liquid level control system of the double capacity tank can be realized by using the double-tank tank process control experimental system and computer control technology. This design is mainly based on the real-time simulation platform, and double-tank system is designed and controlled. 2. Whole design scheme This experiment mainly uses the object simulation platform for the design of the double-tank for debugging and experiment. The mathematical model ran and calculated in the computer, and then is linearized into 1-5V voltage, and it is output from the computer through the Q4 data acquisition card. the simulated field signal acquisition process is completed. Then, the standard signal that 1-5V is converted to 4-20mA is transmitted to PLC through the converter. The control signal was converted from 4-20mA to 1-5v by PLC operation and then is returned to the scene for control. The computer 271
programming and computer monitoring can be realized by AI and AO model. The monitoring and operation process of PLC is completed. The overall physical simulation block diagram is shown in the Fig.1. Server (SIMULINK) (QuaRC) PLC (upper computer) (lower computer) Figure 1. Overall physical simulation block diagram. 3. Double-tank modeling based on SIMULINK 3.1 Modeling of the self-balance process The so-called self-balancing process refers to that when equilibrium state is destroyed and no operator or instrument is required to intervene, it can rebalance by itself. For example, a single-tank liquid level is controlled process, its inflow volume is Q1, and its outflow volume is Q2. In the tank the process of storing or draining water because of the inequality of Q1 and Q2 is reflected by the change of single-tank liquid level H. If Q1 is the input variable of the controlled process, H is the output variable of the controlled process, The mathematical model of the controlled process is the mathematical expression between H and Q1[2-3]. According to the dynamic volume equilibrium relationship: dh Q 1 Q 2 = A. (1) dt The formula (1) is expressed as an incremental: d h Q1 Q2 = A. (2) dt The inflow of upper water tank is controlled by the voltage signal to the pump. The discharge volume of upper water tank is related to the height of the upper tank (i.e. the static pressure generated) and the cross-sectional area of the outlet hole of the upper tank and the cross-sectional area of the upper tank, The liquid level of the upper tank gets higher, the static pressure in the water tank increases, the flow rate of the outlet increases. The inflow of the lower water tank is determined by the discharge of the upper tank. The outlet flow of the lower water tank is determined by the height of the lower tank and the cross-sectional area of the outlet of the water tank and the cross-sectional area of the lower tank. The liquid level H2 of the lower tank gets higher. The static pressure in the water tank increases, the flow rate of the outlet increases. According to the principle of quantity balance, the system can be described by the following nonlinear differential equations: K V dh p p A 01 2 gh 1 dt A t1 1 =. (3) 272
dh A01 2gh A02 2gh 2 1 dt At 2 2 =. (4) The liquid level of the upper tank and the lower water tank are H1 and H2 respectively, Vp represents the driving voltage of the pump. The meanings and specific values of other parameters are shown in table 1: Table 1. Parameter values. Symbol Physical quantities and units Values Ao1 At1 Kp A02 At 2 The cross-sectional area of water hole of upper tank(cm 2 ) The cross-sectional area of the upper tank (cm 2 ) The flow coefficient of the pump(cm 3 /s/v ) The cross-sectional area of the outlet of the lower tank(cm 2 ) The cross-sectional area of the lower tank (cm 2 ) 0.1781 15.5179 3.3 0.1781 15.5179 g gravity acceleration(cm/s 2 ) 981 3.2 The realization of real-time simulation of double-volume water tank Based on the mathematical model of the double-volume water tank, SIMULINK software is used to build the simulation model[4-5] as follows. Figure 2. Double-tank model. 3.3 A real-time simulation model of open loop of double capacity tank. The two-volume tank model and the model that the liquid level are converted into the voltage and the model that the 1-5v voltage is converted to 0-22v voltage are packaged. With the help of QuaRC, the signal is output from the computer, thus the communication with PLC is realized. A real-time simulation of the open loop model is established. 273
Figure 3. Simulation model of double capacity tank. 4. The physical module of PLC In this experiment, the signal of simulation site is collected by PLC. And the Simulation site is operated and monitored by the Upper unit state, next computer programming. Through the WinCC configuration software, the configuration of the double-tank model, the next computer programming and the dynamic change surface and trend graph of double capacity water tank, Simulation of the dynamic change of liquid level can be seen more clearly. The configuration of the two-volume tank is shown in the figure below. Run the whole system,in the starting screen of the configuration screen, the time scale of the set value given, and the final monitoring picture shown in the figure, the final monitoring picture is shown in the figure. Figure 4. Main picture and trend curve. 5. Summary PLC and SIMULINK software are used in the computer control system. By Using SIMULINK, a physical model can be easily build in this software, the physical model can be calculated and converted into electrical signals, the function of simulation site is realized through data collection card output. By using PLC, the computer control, data exchanging, curve output, monitoring in real time, animation display and other functions can be completed. At the same time, the physical simulation platform is used to provide a wide range of space and study platform, the system design and construction can be realized easily. 274
References [1] Zhu Tao, Zhou Tianpei. Design of Double Capacity Water Tank Level Control Simulation and Reality Experiment System Based on PLC[J]. Experimental Technology and Management, 2013, 30(11):29-33. [2] Yang Xu, Zhou Yue, Yu Guangping. Cistern Level Control System Design and Research[J]. Manufacturing Automation, 2011, 3(88):128-130 [3] Wang Zhixin, Gu Yundong, Wang Jiayin, Song Wenyan. Several Level Control Experiments on Double-tank System and the Modeling of these Plants[J]. Journal of Beijing Normal University (Natural Science) 2006, 42(2):126-129. [4] Chen Wei, Wu Gang. Modeling of Nonlinear Two-tank System and Model Predictive Control[J]. Journal of System Simulation, 2006, 18(8):2078-2081, 2085. [5] Zhaoxia Ling. Design of Computer Level Control System[J] Mechanical Engineering & Automation, 2011, 14(4): 140-141. 275