Design of Liquid Level Control System Based on Virtual Instrument

Publisher:烟雨江湖Latest update time:2011-10-08 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

People's lives and industrial production often involve the control of liquid level and flow. For example, in the production and processing of beverages, food processing, residential water supply, solution filtration, sewage treatment, chemical production and other industries, liquid reservoirs are usually used. The liquid level in the reservoir needs to maintain a suitable height. If it is too full, it is easy to overflow and cause waste, and if it is too little, it cannot meet the demand. Therefore, it is necessary to design a suitable controller to automatically adjust the inlet and outlet flow of the reservoir so that the liquid level in the reservoir remains at a normal level to ensure the quality of the product and production efficiency. These practical problems in different backgrounds can be simplified to the liquid level control problem of a certain water tank. Therefore, the liquid level is an important parameter in the industrial control process. Especially in a dynamic state, using appropriate methods to detect and control the liquid level can achieve good production results.

Traditional liquid level control systems are mostly implemented using PLC and configuration software, and there are also systems controlled by single-chip microcomputers, which are so-called real-time measurement and control systems. However, in actual production, the time constants of most industrial objects are usually in the range of seconds to minutes. Therefore, except for a few objects with small time constants, the computer system can directly complete the process automatic control tasks in continuous production safely and effectively.

The rapid development of modern computer technology and information technology has impacted all areas of the national economy and has also caused a huge change in measuring instruments and testing technologies. Since the concept of virtual instruments was proposed by National Instruments Corp. (NI) in 1986, virtual instruments have quickly occupied the market due to their cost-effectiveness, openness and other advantages. The core idea of ​​virtual instrument technology is to use the hardware/software resources of computers to software (virtualize) the technology that originally required hardware implementation, so as to minimize system costs and enhance system functions and flexibility [1]. Based on the important role of software in the VI system, NI proposed the slogan "The software is the instrument". This paper uses the liquid level control system developed by NI LabVIEW to implement automatic control of a single-volume liquid level object under laboratory conditions and achieves good regulation effects.

2 System Structure

2.1 Controlled Objects

The system is a FESTO compact process control experimental device, as shown in Figure 1. The water tank B102 is the control object, the water tank B101 is used to store water, and the actuator is the pump P101.

Figure 1 Schematic diagram of the liquid level control system experimental device

2.2 Control Principle

The data acquisition card used in the system is the PCI6221 multi-function data acquisition card of the M series of NI Company, which has 16 single-ended input channels or 8 differential input channels, the maximum acquisition speed is 250K/s, the resolution is 16 bits, and two analog output channels, the maximum conversion rate is 833K/s, and the resolution is 16 bits. In addition, there are two 32-bit timer counters and 24 digital input and output channels to meet the control requirements of the system.

The ultrasonic sensor is used to convert the liquid level signal into a 0-10v voltage signal, which is collected into the computer through the analog input channel of the NI-6221 data acquisition card. The controller written by LabVIEW sends a control signal based on the measured signal and the set value, and outputs a 0-10v signal through the analog output channel of the NI-6221 data acquisition card to control the pump driver, thereby changing the pump speed to achieve the purpose of controlling the liquid level. The system structure is shown in Figure 2 [2]. The main functions of the system are: real-time data acquisition and display, real-time PID and other algorithm control and data storage.


Figure 2 Block diagram of computer level control system

3 System Software Design

NI's LabVIEW is an excellent object-oriented graphical programming language and an open development environment. It uses icons instead of text codes to create applications and has a large number of VI libraries that communicate with other applications. As the current mainstream international compiled graphical programming environment based on data flow, it can simplify complex, cumbersome and time-consuming language programming into a simple graphical programming method that uses simple or icon-prompted methods to select functions (graphics) and connect various graphics with lines. This allows engineers and technicians who are not familiar with programming to quickly design their own programs and instrument panels according to test requirements and tasks, which greatly improves work efficiency and reduces the workload of scientific research and engineering technicians [1]. Therefore, this design uses LabVIEW as the development language.

3.1 Software Structure[page]

The software adopts modular design [3] and is divided into 7 modules: user management module, parameter setting module, data acquisition module, process flow module, experimental project module, data storage and playback module, and help module. It mainly completes the following functions:

1) Display the real-time change of the liquid level in the water tank;
2) Data preservation and historical data analysis;
3) Two-point control of the liquid level;
4) Parameter setting and modification;
5) Measure and draw the step response curve of the water tank;
6) Design of PID controller and filter.

3.2 Two-point control

When the liquid level is lower than the lower limit, the pump starts working and the liquid level rises; when the liquid level is higher than the upper limit, the pump stops working and the liquid level drops, so that the liquid level is always within a certain range. The measurement range of the liquid level is 20mm-300mm.

3.3 PID control

Conventional PID control achieves system control from three aspects: proportion, integration, and differentiation. The PID control module uses the PID toolkit, which can be used to design interactive PID controllers through the interface in the LabVIEW environment, making full use of the seamless connection between LabVIEW and NI hardware to quickly build the required control system. The PID control program is shown in Figure 3.

Figure 3 PID module program flow chart

4 Experimental control results and analysis

4.1 Two-point control results

The results of the two-point control test on the liquid level are shown in Figure 4, which meets the control requirements well.


Figure 4 Two-point control experiment results

4.2 PID control results

Since the hysteresis effect of the liquid level control system is small, two regulation rules are adopted: proportional regulation or proportional integral regulation. For the selection of control parameters, the transfer function is obtained by using the step response curve method [5], and the control parameters are obtained by combining MATLAB simulation to guide the experiment [6]. After repeated experiments, the optimal parameters are within the range of 90mm-180mm. The control results are shown in Figure 5, and the results are better than the system technical index requirements.

Figure 5 Actual PID control curve ( )

5 Conclusion

The designed virtual instrument system has a friendly human-computer interface. After actual testing, the system is stable and reliable, with fast control response speed and smooth curve changes. It fully meets the requirements of liquid level control and fully reflects the characteristics of virtual instruments. In particular, its scalability is very good, and more advanced control algorithms and other functions such as flow and pressure control can be added at any time, and the development cycle is very short. The liquid level control system designed in this paper has been successfully applied in teaching and experiments, and has achieved good regulation effects. Therefore, the system has the value of promotion and use.

Reference address:Design of Liquid Level Control System Based on Virtual Instrument

Previous article:Design of Virtual Instrument Interface Based on LabVIEW and USB
Next article:Design of Virtual Automatic Weather Station Software Based on LabVIEW

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号