Development of a Virtual Instrument for Gas Microflow Measurement Based on LabVIEW
2026-04-06 04:30:36··#1
Abstract: A virtual instrument for measuring micro gas flow rate was developed using LabVIEW 6.1. The hardware structure, software design concept, and specific implementation of the virtual instrument are explained, and the uncertainty is analyzed based on experimental data. The system features high measurement accuracy, a user-friendly interface, stable and reliable operation, and easy functional expansion. Keywords: Virtual instrument, LabVIEW, Micro gas flow rate measurement Introduction In vacuum technology applications, micro gas flow rates are measured by micro gas flow meters. Accurate measurement of micro gas flow rates (or leak rates) is of great significance. For example, to maintain normal pressure inside a spacecraft cabin over a long period, leak detection is required. This involves not only locating the leak but also accurately measuring the minute leak rate, which is particularly important for manned spacecraft operating for extended periods. Rocket fuel is a flammable, explosive, and toxic gas or liquid; even minute leaks pose a significant danger, necessitating safety monitoring of the rocket fueling process and launch site. In the electronics industry, the manufacturing processes of semiconductor components, integrated circuits, and computer chips require precise control of micro gas flow rate injection to ensure stable process quality and product performance. To meet the above requirements, it is essential to develop a gas microflow meter with higher measurement accuracy and reliability, wider measurement range, intuitive measurement interface, and high degree of automation. The virtual instrument system for gas microflow measurement, constructed using virtual instrument technology, is a research exploration aimed at achieving these goals. Establishment of a Virtual Instrument System for Gas Microflow MeasurementMeasurement Principle of Gas Microflow The measurement principle of gas microflow is as follows: When gas flows out of its variable volume chamber, the servo motor drives the piston to move horizontally in the oil chamber through a translation mechanism. The piston movement changes its volume in the oil chamber, while the volume of the hydraulic oil remains essentially constant. This causes the bellows to deform under the influence of force, keeping the gas pressure inside constant. The gas flow rate Q at temperature Tr (Tr is generally taken as 23℃) is calculated by formula (1) after measuring the gas pressure p, temperature T, and volume change rate dV/dt in the variable volume chamber. As shown in formula (1), when measuring flow rate, it is necessary not only to accurately measure the gas pressure, volume change rate, and temperature in the variable volume chamber, but also to control the gas pressure in the variable volume chamber during the measurement process to keep it constant. Hardware Structure of the Virtual Instrument Based on the principle of "improving measurement accuracy and automation, and reducing measurement uncertainty," a measurement and control system centered on an industrial computer was designed. High-precision measuring tools were selected, and multiple data acquisition cards were used to connect these tools with the control devices, achieving automatic data acquisition and constant pressure automatic adjustment. The overall hardware structure is shown in Figure 1. Hardware and Functional Description Figure 1: Overall Hardware Structure Diagram. Using three Pt100 platinum resistance temperature sensors, three ADAM3013 RTD transmitter modules, and one PCI-1716 multi-function data acquisition card, the system can simultaneously acquire temperatures from the variable capacity chamber, reference chamber, and laboratory. The temperature measurement range is 0–100℃, with an accuracy of 0.1℃. A differential pressure capacitive thin-film gauge (including three gauge heads, a control unit MKS274, and a data display unit MKS670, with a 488 interface on the MKS670, allowing the computer to select the range and gauge head via an IEEE 488 data acquisition card) manufactured by MKS Corporation (USA), and an IEEE 488 data acquisition card manufactured by National Instruments (NI) were used to measure gas pressure. The pressure measurement range was 0–1.01 × 10⁵ Pa. A motion control card PCI-8132, a servo control card, a position control card, and a translational mechanism (mainly including a 70LC-1 permanent magnet DC torque tachometer unit manufactured by Beijing Micro Motor Factory, a HES-10242MD pulse encoder, a lead screw, and a θ5 piston) manufactured by ADLINK Corporation (Taiwan) were used to control the speed and position of the servo motor (see Figure 2 for a simplified diagram of the servo control structure). The lead screw had a lead of 2 mm and an accuracy of 0.001 mm, serving as the reference for displacement measurement. Figure 2. Simplified diagram of servo control structure. The feedback signal of the speed loop is taken from the tachogenerator. Filtering is added to the feedback loop to remove harmonics at low speeds. In the position loop, the position sensing element—the photoelectric encoder—feeds back the generated electrical pulses to the position board. After signal conditioning, the pulses are sent to the subtraction counter in the PCI-8132. With each pulse, the counter decrements by 1 from the target value until the counter reaches 0, at which point the servo motor rotates to the target position and stops. Constant pressure control principle: The differential pressure capacitive film gauge, IEEE488 data acquisition card, industrial computer, 8132 motor control card, position/servo control card, motor, guide rail translation mechanism, piston, hydraulic oil, and bellows together form a negative feedback constant pressure automatic adjustment closed-loop control system. During flow measurement, the gas pressure in the reference chamber remains constant. When gas flows out of the variable volume chamber, it causes a pressure change in the variable volume chamber, generating a pressure difference Δp between the variable volume chamber and the reference chamber. The computer cyclically detects this pressure difference signal. The computer calculates the corresponding motor speed adjustment based on the differential pressure value Δp using a pre-set control algorithm and outputs it to the position control card. This causes the motor drive card to re-drive the servo motor based on the voltage signal, thus adjusting the servo motor's speed. The motor drives the piston to move in the oil chamber, changing the volume of the variable volume chamber and keeping the differential pressure value Δp between the variable volume chamber and the reference chamber near zero, ensuring that the pressure p in the variable volume chamber remains essentially constant. System Control Algorithm This system employs a dual-mode control algorithm combining time-optimal (BB control) and integral-separated PID control. Time-optimal control accelerates the adjustment process, while PID control ensures that tracking accuracy and steady-state error meet requirements. The time-optimal control mode is defined as follows: E1 is the time-optimal control deviation threshold; Rk, Yk, ek, and Uk are the setpoint, detected value, deviation value, and computer output value at the k-th sampling; Umax is the maximum value output by the computer. Integral-separated PID control enhances anti-integral saturation capabilities and prevents overshoot and oscillation. Its basic idea is: when the deviation is large, the integral action is canceled, and only PD adjustment is performed. The integral action is only applied when the deviation is within a certain range, and PID control is performed. The control equation can be derived as follows: Kp, Ki, and Kd are the proportional, integral, and derivative coefficients of the controller, respectively; E is the integral action threshold, which needs to be determined during debugging based on the control accuracy. Software Design and Implementation of the Virtual Instrument The system software adopts a modular design, allowing different measurement contents to be designed as separate functional modules. The main interface program forms the structural framework, with each sub-module performing a specific function and being called from the main interface program or other subroutines. The functional modules are highly independent and can generally be debugged, modified, and ported independently. Therefore, the entire system software has a clear hierarchy, is easy to understand, easy to modify, and facilitates the development of new functions. The system software consists of a gas pressure data acquisition module, a temperature data acquisition module, a piston displacement data acquisition module, a motor drive and speed control module, a pressure compensation program module, and a measurement data storage and display module. Figure 3 shows the main interface of the virtual instrument for gas micro-flow measurement developed using LabVIEW 6.1. Figure 3. Uncertainty Analysis of the Main Interface of the Virtual Instrument for Gas Micro-flow Measurement The uncertainty of the entire instrument is composed of the following parts, which are described separately below. Pressure Measurement Uncertainty Pressure is measured by a capacitive membrane gauge. According to the calibration results of the capacitive membrane gauge by the National Defense Science and Technology Commission's Vacuum Metrology First-Level Station, the uncertainty of pressure measurement is 0.8%. Piston Displacement and Time Measurement Uncertainty Displacement is measured by an encoder. For every 4096 pulses output by the encoder, the piston advances 2mm, with a resolution of 0.5μm. The maximum stroke of the piston in flow measurement is 36mm (corresponding to 73728 pulses). Setting the piston displacement to 73728 pulses (i.e., 36mm), the actual number of pulses output by the encoder is 73726. From the measurement results, the measurement uncertainty of piston displacement is ΔL/L = (2×2)/(4096×36) = 0.0027%. Time measurement is directly taken from the industrial control computer's clock, with an accuracy of 0.001 s. When measuring flow rate, the effective measurement time is greater than 100s. Therefore, the uncertainty of the time measurement is less than 0.001%. The measurement uncertainty of the variable volume chamber temperature is approximately 0.04% because the Pt100 platinum resistance temperature sensor has a measurement accuracy of 0.1K and the laboratory temperature is approximately 23℃. Constant Pressure Control Effect The reference chamber is filled with 104175Pa of N2. The PID control parameters are set, and the flow rate is introduced into the dual-ball calibration system through a small orifice for constant pressure regulation. Figure 4 shows the PID regulation results. Figure 4: Constant Pressure Control Effect Diagram. From the PID regulation results, the pressure difference between the variable volume chamber and the reference chamber is controlled within ±0.004% of the variable volume chamber pressure. After adding the static fluctuation of the gas pressure in the reference chamber (approximately 0.005%), the fluctuation of the gas pressure in the variable volume chamber is approximately 0.0%. From the above experimental results, the relative combined standard uncertainty of the entire flowmeter is much smaller than the flowmeter's design specification (2%). Conclusion In the design of this system, the selection of high-precision measuring elements and advanced measurement and control methods improved the accuracy of flow measurement and extended the lower limit of flow measurement. The application of virtual instrument technology gave the gas micro-flow measurement system a user-friendly interface and ease of operation, improving the system's automation, reliability, and maintainability.